Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Korda on April 10, 2013, 03:56:11 AM
-
Hi,
I am trying to replicate a spaceship controller script that a friend of mine made in c# using Playmaker. I noticed that my friend scales his torques and forces by deltatime so that the controls do not vary with frame rates. My question is: do the addForce and addTorque functions scale by deltatime? I had a look at the scripts and they do not seem to mention it.
-
I'm not sure about deltatime since I haven't messed with it, I know thats typical in scripting though.
For actions, running it in fixed update instead of update is static regardless of framerate.
-
Hi,
the addForce and addTorque do not implement the deltatime trick internally. You will have to multiply the force you want to apply by the deltatime prior them actions.
you can get the deltatime in playmaker using the action "get time info" and select "deltatime",
Or the question is actually about what is this deltatime to being with?
http://docs.unity3d.com/Documentation/ScriptReference/Time-deltaTime.html
http://answers.unity3d.com/questions/296336/timedeltatime.html
bye,
Jean
-
Thanks Jean that helps.
-
Hi,
the addForce and addTorque do not implement the deltatime trick internally. You will have to multiply the force you want to apply by the deltatime prior them actions.
you can get the deltatime in playmaker using the action "get time info" and select "deltatime",
Or the question is actually about what is this deltatime to being with?
http://docs.unity3d.com/Documentation/ScriptReference/Time-deltaTime.html
http://answers.unity3d.com/questions/296336/timedeltatime.html
bye,
Jean
Uhh is it possible to do this inside PlayMaker???
I want to make a racing game and of course the power imprinted to wheels can't be frame dependent!
-
Hi,
yes, using the very action I referenced.
bye,
Jean
-
Thank you, I'm sorry I missed that line ::)
-
no worries :)