Method TryGetThresholdTargetPosition
TryGetThresholdTargetPosition(out Vector3)
Determines if the new target position is within a dynamically determined threshold based on the time since the last update, and outputs the new target position if it meets the threshold.
Declaration
protected virtual bool TryGetThresholdTargetPosition(out Vector3 newTarget)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | newTarget | The output new target position as a Vector3, if within the allowed threshold. |
Returns
| Type | Description |
|---|---|
| bool | Returns true if the squared distance between the current and new target positions is within the allowed threshold, false otherwise. |