F1 game acceleration
![CLV25](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hi,
I am currently working on a car game, which is similar to an f1 style game.
I am having trouble with the acceleration of the car though.
If I use accelerate I cannot find an appropriate way to stop the car.
If I use move it only has one speed.
I am trying to make it as realistic as possible, what movement method should I use?
I am currently working on a car game, which is similar to an f1 style game.
I am having trouble with the acceleration of the car though.
If I use accelerate I cannot find an appropriate way to stop the car.
If I use move it only has one speed.
I am trying to make it as realistic as possible, what movement method should I use?
Comments
instead i suggest :
say you have an "accelerate" button , so when touch is pressed -> accelerate .
in the Otherwise section give it 2 constrains:
1) constrain "self.motion.linearvelocity.X" to self.motion.linearvelocity.X * 0.95
2) constrain "self.motion.linearvelocity.Y" to self.motion.linearvelocity.Y * 0.95
(You can change the 0.95 to adjust the "speed" of the slowdown)
This way when the player is not accelerating the car will slow down and when the player hits accelerate the car will accelerate in the proper way.
Roy.
Heres another way to do it:
by adding dragv(its a self phyics attribute) to the car actor that will slow it down when the cars not acclerating. YOu can play around with that till its how you like. And have your accelerate rule relative to actor, then for you left and right buttons just rotate the actor clockwise and counterclockwise
that should do it for ya
Lump Apps and My Assets