- Home /
How do you make a game object into a controllable player?
I want a game object (e.g. a Cube) to be a controllable player where when you press left or right it turns on the Y axis and forward and backward are obvious. Is there any special script i need or is this something relatively simple to do within unity?
Please Help!
Answer by robertbu · Mar 20, 2013 at 05:56 PM
Make a plane for your surface
Create your object and position it above the plane
Select your object in the hierarchy
From the Component menu select Physics/Character Controller to add a character controller to your object.
From the reference, get the scrip from either of these to links: Move or SimpleMove and attach them to your object.
Note there are lots of tutorials and other learning resources on the net. You might ramp-up faster if you work through some of these tutorials. Here is one site:
Your answer
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
How do I spawn a bullet correctly and add velocity to it? 1 Answer
Multiplayer game, terrain edit control for 2 characters 0 Answers
Rotating GameObject Around Player With "Mouse Y" Position 2 Answers
Player 1 and Player 2 move together 1 Answer