I used to have my game on the XZ plane, now I'm changing it to the XY plane.
Can anybody explain why this code doesn't work on the XY plane?
private void keyboardMovementUpdate() {
horizontalAxis = Input.GetAxis ("Keyboard Horizontal");
verticalAxis = Input.GetAxis ("Keyboard Vertical");
Vector3 targetPoint = Camera.main.ScreenToWorldPoint (Input.mousePosition);
transform.LookAt (new Vector3(targetPoint.x, targetPoint.y, transform.position.z));
// transform.eulerAngles = new Vector3(0, 180, transform.eulerAngles.z); This line "locks" the character in his X and Y rotation.
move ();
}
Uncommenting that line makes the character jump out of rotation, commenting it makes him not move... hmm.