|
Hi I just want to know how i can move a cube with mouse. can somebody help me ? i just want that after i press on a button there is created a cube which hangs on my cursor and after clicking the cube is placed on a plane. I need the script as c# script. thanx!!
(comments are locked)
|
|
I'm not sure what Unity you have, but if you do a search in your Project Window for 'DragRigidbody'. Simply add this to your cube (make sure it as a rigidbody attached to it). Should be a start.
(comments are locked)
|
|
I'm trying to build a Tower Defense. and it should normaly work like one, im Pressing the "tower" button, and after it im alowed to place it on my terrain ( its just a plane in this case) http://www.bilder-hochladen.net/files/3bpq-b-jpg.html here a picture, of it.
(comments are locked)
|

What kind of movement are you trying to do ? How do you want the mouse event registered? Is it drop and drag? Click event = hold and drop on event aswell? Move by auto follow? Is it a 2D or 3D environement? Here's some usefull links for mouse and movement in advance. http://unity3d.com/support/documentation/ScriptReference/Input-mousePosition.html & http://unity3d.com/support/documentation/ScriptReference/Transform-position.html