maint: cleaned up some of the notes and whitespace
This commit is contained in:
@@ -78,13 +78,13 @@ namespace NodeCanvas.Tasks.Actions {
|
||||
|
||||
// Remap the dot to set -1 (opposing direction) to -.5f, and 1 (same direciton) to 1.2f
|
||||
// This is done to allow some sideways jumping direction change, but none backwards, and all forwards
|
||||
float remappedAirDirectionDot = Mathf.Lerp(.3f, 1.2f, airMoveDirectionDot);
|
||||
float remappedAirDirectionDot = Mathf.Lerp(.1f, 1.2f, airMoveDirectionDot);
|
||||
remappedAirDirectionDot = Mathf.Clamp(remappedAirDirectionDot, 0f, 1f);
|
||||
|
||||
// Lerp between the current direction and the inputted direction based on the previous dot product
|
||||
Vector3 outputDirection = Vector3.Lerp(currentInputVector3.normalized, currentVelocityVector3.normalized, remappedAirDirectionDot);
|
||||
|
||||
// If there is a direction force, lean into that based on it's strength
|
||||
// If there is a directional force (such as the Wall Climb jump going straight upward) supplied in the task, lean into that based on it's strength
|
||||
outputDirection = Vector3.Lerp(outputDirection, directionalForce.value.normalized, directionalForceStrength.value).normalized;
|
||||
|
||||
// Extra math to degrade current air move direction by velocity inheritence, before applying new air direction
|
||||
@@ -96,7 +96,6 @@ namespace NodeCanvas.Tasks.Actions {
|
||||
// Set air move direction
|
||||
airMoveDirection.value += outputDirection * outputVelocity;
|
||||
}
|
||||
|
||||
EndAction(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user