fix: player now properly responds to root motion
also contains changes to the animation controller for all the currently made animations, events for the singular attack animation, corresponding methods, and graph changes to utilize them
This commit is contained in:
@@ -204,16 +204,7 @@ namespace Reset.Units{
|
||||
|
||||
// Construct the direction and move
|
||||
Vector3 finalDir = new Vector3(moveXZDir.x, moveYDir, moveXZDir.y);
|
||||
|
||||
Vector3 rootDir = GetComponent<Animator>().deltaPosition * 5f;
|
||||
SetNewSpeed(10f, 1, true);
|
||||
|
||||
Debug.Log(rootDir);
|
||||
// controller.Move(finalDir + rootDir);
|
||||
|
||||
rootDir = Quaternion.AngleAxis(90f, Vector3.left) * rootDir;
|
||||
|
||||
// controller.Move(rootDir * 1f);
|
||||
controller.Move(finalDir);
|
||||
}
|
||||
|
||||
// Setting absolute to true will cause the current gravity to snap to the new gravity value.
|
||||
|
||||
Reference in New Issue
Block a user