I've been trying to make a script that lets me attach an object to the mouse, while keeping the base of the object on the ground. So when you move the mouse around the object moves across the ground while never going any higher than the ground. While it it being moved around with the mouse I want to be able to rotate it with the arrow keys.
I've tried several things and have spent a lot of time trying. The best I can do is place the object at the players position.
i am just a beginner so i made mess with capital and name .....
but i think you can do something like this
create a object-boss
give him all variable you have in a transform component
traslate,x,y,z
rotate x,y,z
so make he create the object you want place on the ground
storing his id (?) in this way
var newObject = Instantiate (myObject);
now you can set the variables of the object using
newObject.transform....
so you can update the "fake"information of the boss in the newObject
and use the input.Getdown(keycode) and the mouse position to
increase and decrease the "Fake"variables
at the end you can cut the link.
var newObject = null
if you want place the newObject where the mouse point, you must use a ray
i dont know how use it , but in the help there are some useful example