User Tools

Site Tools


crpl:docs:setimagerotation

This is an old revision of the document!


~~DISCUSSION~~ <- CRPL reference <- 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). 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.

    # 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
    


  • Next example
crpl/docs/setimagerotation.1383495648.txt.gz · Last modified: 2025/02/14 14:56 (external edit)