Question by
LotusEyes · Sep 28, 2020 at 06:09 PM ·
rigidbodyrigidbody.addforce
Rigidbody falls very slowly when movement force is applied
I'm working on a rigid body character controller, and when ever I apply the movement force to the rigid body while in air, it begins to fall much slower. My current movement script is
Vector3 movedir = new Vector3(Input.GetAxis("Horizontal"), 0f, Input.GetAxis("Vertical"));
player.AddRelativeForce(movedir * moveSpeed * (Time.deltaTime * 60));
//stops player from sliding
if (Input.GetKey("w") == false && Input.GetKey("s") == false && Input.GetKey("a") == false && Input.GetKey("d") == false)
{
player.velocity = new Vector3(0f, player.velocity.y, 0f);
}
And I'm tracking the velocities with
Vector3 playerVelocity = player.velocity;
var fallspeed = playerVelocity.y;
Comment
Your answer
Follow this Question
Related Questions
revolving a rigidbody around another MOVING rigidbody 0 Answers
Accelerate Player with Rigidbody.AddForce 0 Answers
How to move a kinematic rigidbody with touch? 0 Answers
Problem with ExplosionForce radius 0 Answers
Rigidbody addforce not working 0 Answers