Class Vector2MoveTowards
Moves a 2D vector towards a target.
Inherited Members
Namespace: Unity.VisualScripting
Syntax
[UnitCategory("Math/Vector 2")]
[UnitTitle("Move Towards")]
public sealed class Vector2MoveTowards : MoveTowards<Vector2>, IUnit, IGraphElementWithDebugData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable
Properties
defaultCurrent
Declaration
protected override Vector2 defaultCurrent { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Overrides
Unity.VisualScripting.MoveTowards<UnityEngine.Vector2>.defaultCurrent
defaultTarget
Declaration
protected override Vector2 defaultTarget { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Overrides
Unity.VisualScripting.MoveTowards<UnityEngine.Vector2>.defaultTarget
Methods
Operation(Vector2, Vector2, Single)
Declaration
public override Vector2 Operation(Vector2 current, Vector2 target, float maxDelta)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | current | |
Vector2 | target | |
Single | maxDelta |
Returns
Type | Description |
---|---|
Vector2 |
Overrides
Unity.VisualScripting.MoveTowards<UnityEngine.Vector2>.Operation(UnityEngine.Vector2, UnityEngine.Vector2, System.Single)