Game Development Reference
In-Depth Information
30.
//No object under the mosue pointer,
31.
//look far away
32.
trans-
form.LookAt(camToMouse.GetPoint(500));
33.
//Hide the marker
34.
targetMarker.position =
35.
transform.position - Vector3.forward;
36.
}
37.
}
38.
39.}
Listing 83: A script to make the object always look at the position of the mouse pointer
Search WWH ::




Custom Search