- Home /
How to move Player Object horizontally with Touch while moving Forward Constantly?
Out on the app store there are games that involve keeping your finger on the screen at all times, and moving slightly left or right of the player to move it in that direction. Basically, where ever you put your finger on the screen, the Player should move to the position of your x coordinate touch input whilst you're touching, and holding on the screen.
Basically, hold your finger on the screen and move left and right, whilst its still on it to move.
Any advice? Need it to really be in one script, on the Player GameObject.
Answer by Lazdude17 · Nov 01, 2019 at 03:59 AM
you definitely want these in separate scripts. Controls should be separate from actions.
to get your player to move constantly, you just need to run a move function in Update or FixedUpdate
Sorry for not being specific enough, but I already have the separate auto move script on my Player GameObject. I just need the touch based Player Controller, should be able to make in one script, I'm currently making on right now, just need some guidance. Please and thank you.
Your answer
Follow this Question
Related Questions
Trying to make a 2d object launch towards the mouse when I left click. can anyone help? 2 Answers
3rd person camera bugs when moving backwards 0 Answers
How to move player head using mouse movement 0 Answers
rigidbody based character controller 0 Answers
,Switching 2D platformer from x.y to z,y 0 Answers