Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: ryf9059 on June 06, 2013, 03:41:41 AM
-
Just wonder, with the help of state machine, is it still necesary to include deltaTime factor during mathmatical calculation to ensure stable and smooth framerate?
-
Hi,
It depends the action really, some have it built in, some don't.
for example, some actions have "Per seconds" option which is what you want,
It's very rare when I need to manually multiply a fsm variable with delta time to achieve something, so in doubt, simply ask here, or check the code of the action you want to use to see what's actually going on ( right click on the action and click "edit script")
bye,
Jean
-
It depends the action really, some have it built in, some don't.
for example, some actions have "Per seconds" option which is what you want,
It's very rare when I need to manually multiply a fsm variable with delta time to achieve something, so in doubt, simply ask here, or check the code of the action you want to use to see what's actually going on ( right click on the action and click "edit script")
I use it for moving the player by getting axis vector.
But when I choose per second the player will not move at all.
I choose per frame and it works normally.
Also, I thought the fix update is for the delta time thing. After your explanation this confuses me
-
Hi,
what action are you using?
The delta time is for any types of updates: Update,LateUpdate,FixedUpdate.
http://docs.unity3d.com/Documentation/ScriptReference/Time-deltaTime.html
http://answers.unity3d.com/questions/296336/timedeltatime.html
bye,
Jean
-
what action are you using?
Translate with the followig enabled. I'm getting movement by using get axis vector
(http://i.imgur.com/1bwFJlV.png)
-
Hi,
Simply check "per seconds" and it will all start to work (provided your factor is greater than 1)
bye,
Jean
-
Simply check "per seconds" and it will all start to work (provided your factor is greater than 1)
Just one last question, the per seoncd option seemed to work in a quite similar way as fixed update (over one second interval). What's the differences between these two? Can these two be used together? Since my player moves at certain speed even if the framerate drops I still want it to move some distance after certain time has passed which is independent from framerate and that makes me think of using fixed update.
Thanks
-
Hi,
This is a misleading naming. Anything XXXUpdate is unreliable in terms of timing, FixedUpdate is used for physics based work, but still you should use deltatime inside to make sure your movement are frame rate independant.
so you need to check "per seconds" even if you use "fixed update".
bye,
Jean
-
This is a misleading naming. Anything XXXUpdate is unreliable in terms of timing, FixedUpdate is used for physics based work, but still you should use deltatime inside to make sure your movement are frame rate independant.
so you need to check "per seconds" even if you use "fixed update".
How do I get deltatime in FSM? Which action is it?
-
As far as i know there is no delta time action.
Delta Time is a feature wich is implemented in some actions (e.g. per second in translate)
You can manually build an event with a few actions wich act like delta time. Jean described it in your other thread.
I just had the similar question, check out the unitypackage Jean provided in this thread:
http://hutonggames.com/playmakerforum/index.php?topic=3947.msg18498#msg18498 (http://hutonggames.com/playmakerforum/index.php?topic=3947.msg18498#msg18498)
-
Hi,
there is an action to get the delta time actually: "Get Time Info". In there you can selected different time properties, one of which is DeltaTime.
https://hutonggames.fogbugz.com/default.asp?W496
Bye,
Jean
-
If you right click on Translate then Edit Script, you will find out that having the "Per Second" option checked causes it to multiply the translate by Time.deltaTime.
If you are not getting any movement, are you multiplying the axis by some sort of speed variable? (Get Axis -> Multiplier)
Cheers,
Bryan