Any ideas in relate to a cube rolling? thank you!
I have a cube as my player and this object can move correctly. However, I want the cube to roll forward when I press 'W', backward when I press 'S'. left when I press 'A' and right when I press 'D'. Please can anyone help me on how I can go on about doing that. Thank you so much in advance!
Try using Rigidbody.AddForceAtPosition to add force somewhere near the upper half of the cube, that way it will be pushed forward (hopefully). If you use no RigidBody, just use Transform.Rotate, transform.eulerAngles or similar (lots of examples for making objects rotate over time).
Your answer
Follow this Question
Related Questions
[Daydream][C#]How would I make a simple directional controller with Google Daydream Controller? 1 Answer
Rigidbody velocity and AddForce overrides,Rigidbody.velocity overrides the Force 0 Answers
Check if the player is off/on the path. (3D; c#) 1 Answer
Ground check BoxCast is detecting when player hits bottom of platform. UNITY 2D C# 0 Answers
Help on how to code crouching? 0 Answers