User Tools

Site Tools


4rpl:commands:rotatetowardscell

Index
Math Utility

RotateTowardsCell

RotateTowardsCell(<-sx <-sz <-tx <-tz <-maxDegrees) ->angZ ->angX

Description

Similar to RotatedTowards but operations only in 2 dimensions. Rotates a start vector (ss, sz) towards a target vector (tx,tz). Will not move more than maxDegrees. The resulting vector is pushed to the stack as two floats. Each vector is treated as a direction rather than a position. If negative maxDegrees is specified, the result is a vector that rotates away from the target vector.

Examples

RotateTowardsCell(1 0 1 1 10) ->angZ ->angX

Index

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