User Tools

Site Tools


4rpl:commands:movetowards

Index
Math Utility

MoveTowards

MoveTowards(<-current <-target <-maxDistance) ->result

Description

Calculate a position between the points specified by current and target, moving no farther than the distance specified by maxDistance. Current, target are treated as vector3. MaxDistance is a float. Result is a vector3.

Examples

MoveTowards(GetUnitPosition(self) <-target 2) ->result

Index

4rpl/commands/movetowards.txt · Last modified: 2022/09/04 09:27 by Karsten75