- Home /
How to get my character to move left to right?
Hey I am new to unity and javascript, I did the javascript lesson on codeacademy and thought I would test myself and try to make a very simple app! Well turns out I am stuck on getting my character(a ball) to move from left to right and jump from platform to platform using touch.position any help?
Here is the lin to my code: http://pastebin.com/Qu1f0M6j
Your first step should probably be to figure out what type of controller you want your character to use. The most common answer to that question is usually a CharacterController, though it's just as valid (though a bit more intensive) to use a Rigidbody combined with a script of your own. I would suggest reading up on the CharacterController documentation, and possibly looking up some tutorials.
[Edit] I should note that Unity does come along with some -very- useful scripts for the CharacterControllers to manage movement for you. There should be a first-person script and a third-person script in the CharacterController package among the default package import options in Unity.
So I should try adding a charactercontroller to my object and edit my code from there?
Your answer
Follow this Question
Related Questions
Drag+an+object+to+touch+position(Problem) 0 Answers
Get touch position? 0 Answers
Input Touch.position 'inverted' relative to screen? 1 Answer
displaying playerprefs 1 Answer