how to change the velocity of a rigid body based on a forward
hello, i'm trying to make a vehicle controller based on a rigid body.
with the steering i'm hoping to change the players velocity direction when turning. so let's say the player turns right, it'll preform the operation;
playerRb.velocity = (playerRb.transform.forward + (turnLeftForward * steeringAmnt));
-"playerRb" being the rigidbody used to control the movement -"turnLeftForward" being the new desired direction -"steeringAmnt" being the joystick input, used to difference between the current and the desired left should be calculated
the issue i'm having with this line is that when i attempt to use it, all the velocity the vehicle had is lost basically instantly, and preserves none of the momentum it once had.
can someone please help me understand where i'm going wrong with my logic? please and thank you.
Your answer
Follow this Question
Related Questions
Only limit player input and not external forces (Rigidbody 3D) 1 Answer
Why is new Vector3 stronger when player is in the air? 0 Answers
How could I enact two forces on a rigidbody? 0 Answers
How can i move a rigidbody according to its local axis? 0 Answers
Predicting the hit point on X axis, based on vector direction 1 Answer