User Tools

Site Tools


4rpl:commands:rotatetowards

This is an old revision of the document!


Index

RotateTowards

RotateTowards(<-start <-target <-maxDegrees) ->vec

Description

Rotates a start vector (x,y,z) towards a target vector (x,y,z). Will not move more than maxDegrees. The resulting vector is pushed to the stack as a float of three floats. Each vector is treated as a direction rather than a position and is treated as having 3 values. So 4 dimensional vectors are not supported. If negative maxDegrees is specified, the result is a vector that rotates away from the target vector.

Examples

RotateTowards(V3(1 0 0) V3(1 1 1) 10) ->vec

Index

4rpl/commands/rotatetowards.1610121708.txt.gz · Last modified: 2021/01/08 11:01 by 127.0.0.1