- Home /
Can i make more gripped rigidbody sphere Controllers
Greetings! I can't figure out some rigidbody movement and velocity . like the tutorial roll-a-ball use
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
Vector3 movement = new Vector3(moveHorizontal,0.0f,moveVertical);
rigidbody.AddForce (movement * speed * Time.deltaTime);
but if i suddenly changes the movement (like now with this code when you are in full speed and then want to change the speed then you have to wait until ball didn't forgot it's first momentum and it will run on other direction .
But i thing to use on each key just
players.rigidbody.velocity = new Vector3(0,0,0);
players.rigidbody.velocity = players.rigidbody.velocity.normalized;
I can figure out normalized speed after changing vector3 to 0,0,0 . but when i tried on each input by also using bool then i didn't get results just got some errors.
Can you please tell me how can i do that and make more powerful controller for my player ball .
Your answer
Follow this Question
Related Questions
Is it possible to increase stopping distance with forcemode.velocitychange? 0 Answers
Controll 3D Rigidbody Projectile with Joystick 1 Answer
Continuing the momentum of the rigidbody 0 Answers
Velocity powered rigidbody on a moving platform without parenting. 3 Answers
How to save Velocity as vector3? 1 Answer