From ZDoom Wiki
Jump to: navigation, search
Graficon.gif Warning: This feature is GZDoom specific, and is not compatible with ZDoom!
To see all of GZDoom's specific features, see GZDoom features.

A_SetRoll (float roll [, int flags [, int ptr]])


Sets the calling or pointed to actor's roll to the value of the first parameter. It can be used with the roll DECORATE variable to modify the actor's current roll. This affects the player camera, models and the sprites of actors with the ROLLSPRITE flag.

For players, the view is rolled and so is the model, if one is supplied.. Positive numbers rotate the screen counter-clockwise (left side rising, right side lowering), while negative numbers rotate it clockwise (right side rising, left side lowering).


  • roll: The actor's new roll, in degrees. The range is [0,359].
  • flags: The following flags can be combined by using the pipe character | between the constants names:
    • SPF_INTERPOLATE: Interpolates the view, smoothing it out over the delay of 1 tic.
  • ptr: The actor to change its roll. This is an actor pointer. Default is AAPTR_DEFAULT, which corresponds to the calling actor.


Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contibutions are greatly appreciated.