- Home /
Other
How to make an object have velocity after a flick (mobile devices)
I want to be able to drag a "ball" and when the finger is released the ball will leave with a velocity that will reduce over time. I have no clue on how to approach this and would like to know if you guys have any ideas.
This question is too broad and lacking details. Explore the following
How are you going to move the object: Rigidbody, Transform, CharacterController?
$$anonymous$$apping between screen space and world space: Physics.Raycast, Camera.ScreenToWorldPoint().
How do deal with the difference screen resolutions.
The many drag and drop questions and scripts posted on UA
Note if you are going to Rigidbody, then see the default DragRigidbody.js script. It may mostly do what you want. Set some drag on the Rigidbody on the ball to slow it down over time.