|
New to Unity and Scripting... I would like a simple example of dragging a 3D object by touching the screen. I would like the object to stay under the users finger when moving. I am either terrible at searching or there aren't many simple examples out there (probably the former). (I would then like to restrict the drag movement to the xz plane but I will add this as a separate question.)
(comments are locked)
|
|
See http://unity3d.com/support/documentation/ScriptReference/Collider.Raycast.html. You would implement an OnMouseDrag handler in a script to set the position. To keep it in xz, just set the y component to 0 (or whatever constant you want).
(comments are locked)
|
