- Home /
Simplest way to drag and object around in 2D space.
Hi,
What's the simplest way to drag an object around with tap and drag? Objects will move only in X/Y plane.
Thanks.
Comment
Answer by Rati · Oct 28, 2012 at 04:36 PM
You could do a raytrace from the camera to get and "Grab" your object.
Then, make the object follow the mouse cursor. (with OnMouseDrag, or with raycasting from camera, or by converting yourself the cursor position to your ingame position ?)
until you release the button to "drop" the object
Your answer
Follow this Question
Related Questions
UI drag and drop 1 Answer
Simple drag and drop - no physics 4 Answers
Pickup and move GameOjbect? 1 Answer
Drag and drop doesn't work properly 0 Answers
Throwing an object (applying force to it when mouse is released) 2 Answers