Client.player.applyImpulse(%client.player.position, ...
by Corin · in Torque Game Engine · 12/15/2005 (5:27 am) · 2 replies
About the author
#2
It would be best to set the bike up as a vehicle in game, and adjust mass and acceleration according to your desired game play mechanics.
Leave applying impulse for when the player decides to try off-roading ;)
A good place for you to start may in fact be starter.racing, look at how the buggy is setup.
12/15/2005 (6:18 am)
Yes but I think you are using the wrong function.It would be best to set the bike up as a vehicle in game, and adjust mass and acceleration according to your desired game play mechanics.
Leave applying impulse for when the player decides to try off-roading ;)
A good place for you to start may in fact be starter.racing, look at how the buggy is setup.
Torque Owner Dreamer
Default Studio Name
If I remember correctly, it is a repulsive force.
Say for instance you are driving 75 MPH in your brand new pick-up truck.
You then hit a boulder.
You have now called the OnCollision function which checks the force using something akin to Newtons Second Law (f=ma) and if it was sufficient to provide a reactive force in the equal or opposite direction, greater than your mass then you are repelled away from the impact source.
Impulse is in effect Newtons 3rd law