Rotatepoint: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Helixhorned (talk | contribs) suggest a more readable way to rotate clockwise |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
rotatepoint <xpivot> <ypivot> <x> <y> <ang> <xreturnvar> <yreturnvar> | '''rotatepoint''' <xpivot> <ypivot> <x> <y> <ang> <xreturnvar> <yreturnvar> | ||
Rotates the point around the pivot by the specified angle and returns the coordinates into ''xreturnvar'' and ''yreturnvar''. | |||
:<xpivot> | :<xpivot>, <ypivot>: the coordinates (X and Y) of the central pivot point | ||
:<x>, <y>: the coordinates of a point to rotate in relation to the pivot point | |||
:<x> | :<ang>: how many units to rotate (2048 per revolution; clockwise) | ||
:<xreturnvar>, <yreturnvar>: the post-rotate coordinates of the point | |||
:<ang>: how many | |||
:<xreturnvar>: the post-rotate | This command can be used in conjunction with [[dragpoint]] for rotating sectors. The rotatepoint command calculates the end position for a wall point after rotating. To move the point to that position, use [[dragpoint]]. | ||
Swapping the X and Y axes or negating <ang> gives the effect of rotating in the opposite direction (CCW instead of CW). | |||
[[Category:EDuke32 specific commands]] | |||
[[Category:Sector manipulation]] |
Latest revision as of 04:46, 17 February 2013
rotatepoint <xpivot> <ypivot> <x> <y> <ang> <xreturnvar> <yreturnvar>
Rotates the point around the pivot by the specified angle and returns the coordinates into xreturnvar and yreturnvar.
- <xpivot>, <ypivot>: the coordinates (X and Y) of the central pivot point
- <x>, <y>: the coordinates of a point to rotate in relation to the pivot point
- <ang>: how many units to rotate (2048 per revolution; clockwise)
- <xreturnvar>, <yreturnvar>: the post-rotate coordinates of the point
This command can be used in conjunction with dragpoint for rotating sectors. The rotatepoint command calculates the end position for a wall point after rotating. To move the point to that position, use dragpoint.
Swapping the X and Y axes or negating <ang> gives the effect of rotating in the opposite direction (CCW instead of CW).