- Home /
5.4 broke rigidbody.addForce?
The physics for my player worked, but then when i updated to 5.4, the physics went crazy.
Whenever i add force in a direction, anything passed a certain amount causes the flying player to pull up rapidly.
I've tried every possible solution i can think of, no luck. Here's the gist of how i'm applying force in FixedUpdate(). Basically i have a few things that can apply force to the rigidbody they are added together, then i call AddForce. Any ideas? Any guesses why it would pull upwards like this? I noticed they rewrote transform in 5.4, has anyone else seen problems with the new transform?
Vector3 forceToAdd = Vector3.zero;
forceToAdd += applySpecialForces();
forceToAdd += (movement.normalized * (23 + statManager.FlySpeed)) * multiplier * speedAdjust;
forceToAdd = buffManager.GetAdjustedSpeed(forceToAdd);
target.AddForce ( forceToAdd, ForceMode.VelocityChange);
Your answer
Follow this Question
Related Questions
add force to object that has 2 different rigid bodies 0 Answers
Issue with Instantiate and the instant that spawns on a moving object that rotates 1 Answer
Rigidbody.velocity seems to be breaking jumping physics 0 Answers
Sudden surge of force applied to a rigidbody from continous jumping. 1 Answer
VR Sword Physics, how to add force or velocity to the sword for impact when it hits an object 1 Answer