Addforce to Z axis rotation via touch input/ mobile
Hello all! Quite new to game development in general and I was hoping to find some help on a very specific issue I'm having. I am working on a mobile game where the game world is presented as a sphere on the bottom of the screen, where I would like the player to be able to swipe left or right to rotate/spin the world to see all around the sphere. Initially I had just used a simple GetTouch script to find the deltatime of the x position and rotate the camera on the Z axis to create the illusion that the world was spinning. My issue with this is that when you let go of the screen the world stops immediately. What I would like to happen is that the world's momentum is affected by the player's swipe so when you let go of the screen the world will keep spinning, and gradually slow to a stop. Since I am still fairly new to everything what would probably be most helpful is to have some explanation of specific elements that would help my situation. If instead though it would just be easier to post your own code and have me de-construct it, I would have no complaints. Thanks for your consideration and time.
Your answer
Follow this Question
Related Questions
Brackeys's Making a Video Game going mobile and collision issue 0 Answers
Rigidbody AddForce doesn't matter what rotation 0 Answers
How to make a cube rotate while moving? 1 Answer
Mobile Build laggy? 0 Answers
Restrict second touch 0 Answers