how do you rotate car wheels only?

error123error123 Member Posts: 112
edited November -1 in Working with GS (Mac)
I am testing a new app about cars. One major issue i have is, when you rotate the car is turns its whole entire body with it. i just want to roate the axels with the wheels on it so it moves like a real car would. is there anyway you can do this?

Comments

  • RattleheadRattlehead Member Posts: 485
    Assumptions:
    1) The car is being viewed from the side.
    2) The car and wheels are all apart of a single image.

    To start, the wheels will have to be separate actors from the body of the car. Then you'll need to constrain the locations of the wheels so they remain in the wheel wheels on the car frame.

    If that is what you are looking for though, do you believe that there is a lot of value in what little detail would be added? The only thing I can think that would be gained would be that the player would see any details in the hubcaps rotating. Could drag down your performance a bit.

    Good luck on your project.
  • error123error123 Member Posts: 112
    the car view is top down. birds eye view. yeh i can try that but would the car follow the wheels then and the direction that the wheels are pointing in?
  • RattleheadRattlehead Member Posts: 485
    You have a couple of options then.

    Option #1: Images
    Make several images:
    - one with the car facing straight ahead
    - one with the wheels to the left
    - one with the wheels to the right

    Then if the player presses whatever button makes the car turn left or right, display the appropriate image while the button is being pressed. That would probably be the easiest way to go from a programmatic standpoint.

    Option #2: Multiple Actors Constrained
    The further I get into writing this down, the less this sounds like a good idea; definitly more complicated.

    It would involve two actors; the car body and a wheel (should only need one since actors can be duplicated in the scene and they are both going to be facing the same direction anyways).

    The body of the car would be layered in front of the wheel and the logic in the wheel would be constrained to follow the cars body. Same as above, depending on what direction the player choses to go, rotate the tire objects appropriately.

    Hope that helps.
  • RattleheadRattlehead Member Posts: 485
    tshirtbooth said:
    http://gamesalad.com/game/play/25955

    Well look at you go. ;)

    It's like you foresaw the future or something and knew that error123 would ask this question.
Sign In or Register to comment.