I copied and altered some of Duck's code from the question: 'Click 3D objects (markers) in the distance, causing the camera to snap to that location'. My script added to the cube works BUT the camera ends up facing the wrong way when the script is over. Whats the fix? script for the cube:
} The cube also needs another script which points it towards the fixed point:
function Update () { transform.LookAt(target); }
thanks!
(comments are locked)
|
|
The problem could be the Quaternion.Slerp(startRot, targetRot, i). This statement change player's rotation to the rotation of the object (cube here). Vote me up so that I know you still need help on it.
(comments are locked)
|
