This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Compute a force that will redirect a character's speed into movement along a circle. | |
/// </summary> | |
/// <param name="characterPosition">The current position of the character in world space.</param> | |
/// <param name="swingTarget">The position of the center of the swinging circle in world space.</param> | |
/// <param name="swingDistance">The intended fixed distance between the character and the hook target.</param> | |
/// <param name="controller">The character's controller.</param> | |
/// <returns>A force that, if set on the character, will move them to a new position along the swinging | |
/// circle relative to their current velocity. | |
protected static Vector2 ComputeSwingForce(Vector3 characterPosition, Vector3 swingTarget, float swingDistance, CorgiController controller) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.