correct forward facing angle when not auto locking

This commit is contained in:
jparent 2015-08-22 22:30:38 -04:00
parent f470b653be
commit 71b2eae11e

View File

@ -85,7 +85,7 @@ public class ChildController : MonoBehaviour
else {
transform.eulerAngles = new Vector3(
transform.eulerAngles.x,
Mathf.Atan2(xLookingValue, zLookingValue) * Mathf.Rad2Deg,
Mathf.Atan2(xLookingValue, zLookingValue) * Mathf.Rad2Deg -90, // -90 to correct forward facing angle...
transform.eulerAngles.z);
}
}