I am currently working on a game to learn.
So let’s say, I have this object: a sphere. This sphere will roll towards the direction the cam is looking at. I’ve managed to get this far.
Now I want to ‘roll’ the ball with my finger, i.e. I’ll swipe over my touchscreen and if my finger touches the sphere it need to roll.
So I figured the sphere needs to have a detection when it’s touched, so far so good.
But how do I manage to get/set the speed, length and direction of my finger swipe?
If someone could point me out to what I could use, or what I should do next or even an example (commented preferred) I would be thankfull,
Any help is appreciated.
Please forgive me for the bad English you may encounter,
For this you can simply use the touch to mouse function, this code should basically work as is on android:
Thank you very much!
It seems like this is exactly what I was looking for.