User Tools

Site Tools


crpl:docs:setimagerotation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
crpl:docs:setimagerotation [2013/01/14 19:05] – created chanicrpl:docs:setimagerotation [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
-TODO+ 
 +<- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#image_commands|Image Commands]] 
 +=====  SetImageRotation  ===== 
 + 
 +^  Arguments  ^  Result  ^  Notation 
 +|A unit UID, image slot, rotation in radians| |  %%i1 s1 f1 -- %%  | 
 + 
 + 
 +=== Description === 
 +Sets the rotation of the image (in radians). Rotation occurs around the center of the image.  The slot named “main” refers to the primary unit image (the one that can be set in the editor). 
 +=== Examples === 
 + 
 +  * **Rotate an Image**\\ %% %% \\ //This updates the image's rotation every frame, giving the appearance that it's spinning continuously.//\\ %% %%\\ <code> 
 +# Rotate the image  
 +Self "FlyingThing" 0.1 SetImageRotation 
 + 
 +# Make a part spin around 
 +Self "RotatingPart" GetImageRotation ->currentRotation 
 +<-currentRotation 0.1 add ->currentRotation 
 +Self "RotatingPart" <-currentRotation SetImageRotation 
 + 
 +</code> \\  
 + 
 +  * Next example
crpl/docs/setimagerotation.1358190348.txt.gz · Last modified: 2025/02/14 14:56 (external edit)