Returns a vector that represents the position of a point after it’s rotated a specified number of radians about a specified axis. Rotation is counter-clockwise as viewed downward from the axis end position.
vector rot(vector point, vector axis, float angle )
point is the position of a point in the world coordinate system.
axis is the axis around which the point rotates. The axis is a line that passes through the origin and the specified axis position.
angle is the number of radians the point rotates.
rot(<<3,3,0>>,<<1,0,0>>,0.5)
Returns <<3, 2.633, 1.438>>. This is a vector representing the position of point <<3,3,0>> after rotating it 0.5 radians around the axis represented by <<1,0,0>>.
particleShape1.position = rot(position,<<0,1,0>>,0.1);
Suppose your scene has a single-particle object at position <<4,6,0>>, and you wrote the above runtime expression for its particle shape node. When you play the scene, the particle rotates in a circular pattern around the Y-axis (the axis represented by <<0,1,0>>).
In each frame, the particle’s position rotates 0.1 radian, roughly 5.7 degrees.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License