Hello there,
I’m using this simple code:
var yourCube : Transform;
var Timer = 0.0;
var height = 0;
function Update () {
var ray =Camera.main.ScreenPointToRay (Input.mousePosition);
var hit : RaycastHit;
if(Physics.Raycast(ray,hit)){
yourCube.position = Vector3(hit.point.x,height,hit.point.z);
}
}
This works really fine for Orthographic cam but now I need to use Perspective. Can anyone please guide me on how to create a plane to end with the follow up delay?
Thanks in advance