Hello everyone. I searched for a similar question but did not find one, sorry if this is a repeat.
I am working on a project to create a top down game where you can click on a GUI button to place objects (such as houses, benches, tables) into a scene. My problem is I cannot figure out how to move/rotate the object once it has been instantiated. I was thinking maybe using the left mouse button to move it and right mouse button to rotate it around the y-axis.
If you could help me with a script or just point me in the right direction I would be very thankful, and would like to say Thank You in advance.
asked Jun 17 '10 at 04:28 AM
Find the DragObject script from "Unify forums". Than add things like if (Input.GetKey (KeyCode.UpArrow)) MoveUp(); if (Input.GetKey (KeyCode.DownArrow)) MoveDown(); if (Input.GetKey (KeyCode.RightArrow))TurnRight(); or with mouse buttons
answered Jun 17 '10 at 03:35 PM
I'd recommend doing something more obvious. Like you have the concept of a "selected" item (maybe it's highlighted somehow). And on that selected item you have 3D buttons you can click on to cause the object to rotate one way or another.
answered Jun 17 '10 at 12:30 PM