User Tools

Site Tools


4rpl:commands:movetowardsandavoid

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
4rpl:commands:movetowardsandavoid [2022/03/31 21:47] – [Description] Enhancement Vertu4rpl:commands:movetowardsandavoid [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 7: Line 7:
 ===== Description ===== ===== Description =====
 Takes a starting 3D position (a 3-vector) and generates a new 3D position that is moved towards the target (also a 3-vector). The resulting point will not be displaced more than the delta argument. Takes a starting 3D position (a 3-vector) and generates a new 3D position that is moved towards the target (also a 3-vector). The resulting point will not be displaced more than the delta argument.
 +  * The delta is simply the speed (in cells) this unit moves per game frame.
   * The minHeight argument restricts how close, height wise, the resulting point can be to the terrain and/or creeper.   * The minHeight argument restricts how close, height wise, the resulting point can be to the terrain and/or creeper.
   * The checkRange argument is an integer that specifies how many cells outward to inspect when enforcing the minHeight.  A value of 0 means to only check the map cell that the target is currently within on.   * The checkRange argument is an integer that specifies how many cells outward to inspect when enforcing the minHeight.  A value of 0 means to only check the map cell that the target is currently within on.
4rpl/commands/movetowardsandavoid.1648763227.txt.gz · Last modified: 2025/02/14 14:56 (external edit)