Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Marakesch on March 26, 2016, 04:37:29 AM
-
Good day everyone,
I have a ball, which one have acceleration by add force/impulse, when it touch platform. Problem is how to limit its velocity in any direction, when it reach some value. Thanks in advance
-
I think you should be able to do this by:
GetVelocity then clamp via Vector3ClampMagnitude and the SetVelocity.
-
Hi,
yes exactly.
I am currently porting the asteroid Unity network sample, and the ship has velocity clamping, and I use this technic, however just slightly different in the following sense:
for effective physics control, actions should perform on "FixedUpdate", not a regular Updates, and so vector3ClampMagnitude isn't featuring the option to use FixedUpdate.
so I use Vector3ClampMagnitudeAdvanced from the Ecosystem (http://j.mp/PlayMakerEcosystem) which allows for clamping during FixedUpdate which results in a better more reliable system.
Bye,
Jean
-
Thanks for your replys, i will try do it. Before found solution by code, thanks anyway for your answers.