Rotatepoint: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
One (talk | contribs)
No edit summary
No edit summary
Line 1: Line 1:
'''rotatepoint''' <xpivot> <ypivot> <x> <y> <ang> <xreturnvar> <yreturnvar>
'''rotatepoint''' <xpivot> <ypivot> <x> <y> <ang> <xreturnvar> <yreturnvar>


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]].
Rotates the point around the pivot by the specified angle and returns the coordinates into ''xreturnvar'' and ''yreturnvar''.


:<xpivot>: the x coordinate of the central pivot point
:<xpivot>, <ypivot>: the coordinates (X and Y) of the central pivot point
:<ypivot>: the y xoordinate of the central pivot point
:<x>, <y>: the coordinates of a point to rotate in relation to the pivot point
:<x>: the x coordinate of a wall point to rotate in relation to the pivot point
:<ang>: how many units to rotate (2048 per revolution; counter-clockwise)
:<y>: the y coordinate of a wall point to rotate in relation to the pivot point
:<xreturnvar>, <yreturnvar>: the post-rotate coordinates of the point
:<ang>: how many degrees to rotate (0-2047)
 
:<xreturnvar>: the post-rotate x coordinate of the wall 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]].
:<yreturnvar>: the post-rotate y coordinate of the wall point


[[Category:EDuke32 specific commands]]
[[Category:EDuke32 specific commands]]
[[Category:Sector manipulation]]
[[Category:Sector manipulation]]

Revision as of 12:52, 5 April 2011

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; counter-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.