I have a car in profile at the moment. However as it is driving if the car rotates how do i get the wheels which are seperate actors to rotate with it?
Tried using the how to in the first post. When i go to preview i get a scrambled screen. Then when i return to the editing screen the constrain attribute for the follower has been clear of the text entered.
Well thanks for you help. But as i am relatively new to this i cannot seem to work it out. I would like the end product to be when you press the right hand key the car rotates clockwise. When the left key is pressed it rotates c-clockwise. However the wheels (2 seperate actors) will hold their position in relation to the car but rotate with it? Do you have any ideas, because i am stuck.....
Constrain the wheel rotation to the car body rotation. I would think this should work.
Make a game attribute called something like WheelRot, then go into your wheel actor and add a constrain attribute behavior that constrains game.WheelRot to self.Rotation (or whatever it's called). Next, go into your car-body actor and add a constrain attribute behavior to it which constrains game.WheelRot to self.Rotation.
... I haven't tried this but it should work... I think. Maybe I will go try this now before starting papers for my midterm :P Games come first you know.
Did you get it worked out? It might help to post a screen shot of what you're trying to do along with a description. You might get better help that way.
So this is what i am trying to achieve. Sorry for the drawing. Actor 1 has to be able to rotate 360. Which is simple enough. The only trouble is that i cannot get actors 2 and 3 to lock themselves in the same position relative to actor 1 while actor 1 rotates. Actors 2 and 3 will also need to rotate themselves on their central axis.
Comments
and possibly this one:
http://gamesalad.com/wiki/how_tos:gsc_circular_movement
e.g. Constrain Attribute: self.Position.X = game.carX + 12
This won't work well if you are rotating the car but that's where the second how to may help.
Thanks for your help.
Make a game attribute called something like WheelRot, then go into your wheel actor and add a constrain attribute behavior that constrains game.WheelRot to self.Rotation (or whatever it's called). Next, go into your car-body actor and add a constrain attribute behavior to it which constrains game.WheelRot to self.Rotation.
... I haven't tried this but it should work... I think. Maybe I will go try this now before starting papers for my midterm :P Games come first you know.
EDIT: Tested it and it works.
The Actors
http://i3.photobucket.com/albums/y58/MattVG/Game Stuff/Picture2.png
The game attributes
http://i3.photobucket.com/albums/y58/MattVG/Game Stuff/Picture3.png
The Wheel behavior
http://i3.photobucket.com/albums/y58/MattVG/Game Stuff/Picture4.png
The CarBody behaviors
http://i3.photobucket.com/albums/y58/MattVG/Game Stuff/Picture5.png
I hope that helps.
So this is what i am trying to achieve. Sorry for the drawing. Actor 1 has to be able to rotate 360. Which is simple enough. The only trouble is that i cannot get actors 2 and 3 to lock themselves in the same position relative to actor 1 while actor 1 rotates. Actors 2 and 3 will also need to rotate themselves on their central axis.