Skip to main content

Vector3.smoothDamp()

Static utility on Vector3.

Description

  • Smoothly moves the current vector towards the target vector with smoothing control, maximum speed, in the defined interval. |
  • Smoothly moves the current vector towards the target vector with smoothing control, maximum speed, in the defined interval and stores the result in the specified vector. |

Method Signature

smoothDamp(Vector3, Vector3, Vector3, float, float, float)
smoothDamp(Vector3, Vector3, Vector3, float, float, float, Vector3)

Mathematical Definition

Component-wise or runtime-defined transformation based on overload.

Parameters

  • Vector3: 3D vector input.
  • float: scalar numeric input.

Returns

  • Vector3: returned by overloads of this method.

Mutability

  • Does not modify the current vector unless explicitly using a Local/Equal variant.

Edge Cases

  • Zero vectors can produce degenerate outputs for geometric methods.
  • NaN and Infinity inputs propagate according to IEEE-754 floating-point behavior.
  • Repeated operations may accumulate floating-point precision error.

Usage Example

Vector3 a = new Vector3(1f, 2f, 3f);
// Call the method according to your overload requirements.
// Example:
// a.smoothDamp(...);

Mathematical Example

Example input/output depends on overload; for vector arithmetic operations this is typically computed per-component.

Visualization