- Home /
Jumping with rigid body3d
the images detail my concern and notate what's going on... please help
Answer by DenisIsDenis · Jul 10, 2021 at 04:25 AM
Scientific notation means that the value of y
too little. And the character jumps badly because of this line of code:
playerRigidbody.velocity = new Vector3 (forward.x, 0, forward.z) .normalized * movementVelocity;
Here you reset velocity.y
, so the jumps are low and the fall is slow :)
Instead of the line above, write the following:
var velocity = new Vector3 (forward.x, 0, forward.z) .normalized * movementVelocity;
velocity.y = playerRigidbody.velocity.y;
playerRigidbody.velocity = velocity;
Thank you it worked, also when I'm NOT moving the scientific notation keeps changing as if I was but on a microscopic scale, is there anyway to fix this??
With this I have not encountered. In theory, this should not affect the gameplay.
Your answer
Follow this Question
Related Questions
Why wont my character jump? (using rigidbody and addForce) 1 Answer
Why object goes sometimes through walls by adding force ? 2 Answers
how get bow to add more force over time 0 Answers
Distribute terrain in zones 3 Answers
Why is my rigidbody jump height different every time, despite being in FixedUpdate. 1 Answer