fixed: changed how rotation is handled in transition from grounded to air to account for becoming grounded without jumping
This commit is contained in:
@@ -96,9 +96,6 @@ namespace NodeCanvas.Tasks.Actions {
|
||||
targetRotation = Quaternion.Euler(Camera.main.transform.rotation.eulerAngles.Flatten(0, null, 0));
|
||||
break;
|
||||
}
|
||||
|
||||
// Set final rotation
|
||||
agent.transform.rotation = Quaternion.Lerp(agent.transform.rotation, targetRotation, 10f * Time.deltaTime);
|
||||
|
||||
// Construct move direction
|
||||
Vector3 finalMoveDir = Vector3.zero;
|
||||
@@ -125,6 +122,9 @@ namespace NodeCanvas.Tasks.Actions {
|
||||
agent.Move((finalMoveDir + gravityMoveDirection) * Time.deltaTime);
|
||||
}
|
||||
|
||||
// Set final rotation
|
||||
agent.transform.rotation = Quaternion.Lerp(agent.transform.rotation, targetRotation, 10f * Time.deltaTime);
|
||||
|
||||
// ???? Moved this above but don't remember if this needs to be here still
|
||||
if (agent.isGrounded) {
|
||||
jumpPower.value = 0f;
|
||||
|
||||
Reference in New Issue
Block a user