Hi there,
I have a script that places objects:
var ObjectToPlace : Transform;
function Update () {
if(Input.GetButtonDown("Fire1"))
{
var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
var hit : RaycastHit;
if (Physics.Raycast (ray, hit))
Instantiate(ObjectToPlace, hit.point, Quaternion.identity);
}
}
How do I extend this functionality so that the object appears on mouse down (so it follows your mouse across geometry where your mouse is, so you can see where it will be placed) and is placed static on mouse up.
Thanks for the help