added: static facing direction to enum
This commit is contained in:
@@ -12,7 +12,8 @@ namespace Reset.Player.Movement{
|
|||||||
public enum PlayerFacingDirection{
|
public enum PlayerFacingDirection{
|
||||||
Target = 0,
|
Target = 0,
|
||||||
Movement,
|
Movement,
|
||||||
MatchCamera
|
MatchCamera,
|
||||||
|
Static
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,6 +100,9 @@ namespace NodeCanvas.Tasks.Actions {
|
|||||||
// Needed to keep the character from inheriting the camera's height-rotation
|
// Needed to keep the character from inheriting the camera's height-rotation
|
||||||
targetRotation = Quaternion.Euler(Camera.main.transform.rotation.eulerAngles.Flatten(0, null, 0));
|
targetRotation = Quaternion.Euler(Camera.main.transform.rotation.eulerAngles.Flatten(0, null, 0));
|
||||||
break;
|
break;
|
||||||
|
case PlayerFacingDirection.Static:
|
||||||
|
targetRotation = agent.transform.rotation;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct move direction
|
// Construct move direction
|
||||||
|
|||||||
Reference in New Issue
Block a user