- Home /
How do I move my object through physics with my keyboard?
Hello peoples.
I want to move my object - to which I have applied a rigid body to - with physics. What I mean is, this object is a ball and I want to move this ball using physics, to make it roll. How do I do this? I want to do this using my keyboard.
Thanks, Xanco.
Answer by hoy_smallfry · Feb 05, 2013 at 09:26 PM
Create a script that adds forces and torque in the update loop when keys are pressed. There's plenty of documentation on how to do every part of what I just described in the Unity website.
http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody.AddForce.html http://docs.unity3d.com/Documentation/ScriptReference/Input.GetKeyDown.html
Your answer
Follow this Question
Related Questions
Ball Doesn't Quite Roll Right 1 Answer
Strange sphere/physics rolling behaviour when scaled 1 Answer
Ball Doesn't Roll Down Hill - Physics Problem 3 Answers
Another Ball Rolling Game Question 1 Answer
How to make a ball that can roll? 2 Answers