API Reference


setRoll(rollRadians)

Sets the actor's roll angle. See getRoll for an explanation of what the roll angle is.

Caveat: due to the nature of rotation math, manipulating the roll individually when an object has a complex rotation may lead to unexpected results, as rotations are internally stored as quaternions and may have multiple representations in terms of yaw/pitch/roll. If your object has a non-trivial rotation (for instance, a rotation on all 3 axes), use setYawPitchRoll to set all three angles in a single call, or call setRot with a quaternion.

Parameters:
Name Type Description
rollRadians number The new roll angle, in radians.

< All Functions
Transform
Position Get
getPosXgetPosYgetPosZgetPosgetDistanceTogetDistanceBetweengetLocalPosgetSpawnPosselfToWorldPosworldToSelfPosselfToWorldDirworldToSelfDir
Position Set
moveForwardmoveBackwardmoveLeftmoveRightmoveUpmoveDownmovemoveGlobalmoveTowardsetPosXsetPosYsetPosZsetPosXYZsetPossetSpawnPossetLocalPos
Rotation Get
getPointAheadgetPointBehindgetPointAbovegetPointBelowgetPointToRightOfgetPointToLeftOfgetYawgetPitchgetRollgetRotgetLocalRotgetSpawnRotgetForwardgetBackwardgetUpgetDowngetRightgetLeft
Rotation Set
setYawsetPitchsetRollsetYawPitchRollturnspinrotateapplyQuaternionapplyQuaternionSelfsetRotresetRotsetSpawnRotresetSpawnRotsetLocalRotresetLocalRotlookAtlookDirlookTowardlookTowardDir
Scale
getScaleUniformsetScaleUniformgetScalesetScalegrowshrink
Actors
Actors
ActorRefActorRefmyselfdestroySelfexistsgetActorsgetPlayerActorsgetActorsWithTaggetActorWithTaghasTaggetGameRulesActorisOnstageisOffstagegoOffstagegoOnstageisActorInGroupgetActorsInGroupgetActorGroupDescriptiongetClosestActorgetCardTargetActorgetCardTargetActorDescription
Attributes
getDisplayNamesetDisplayNamegetCommentTextsetCommentTextsetVardeleteVargetVar
Cloning
getCloneParentisCloneclone
Properties
propspropNumberpropDecimalpropBooleanpropStringpropActorpropActorGrouppropImagepropSoundpropParticleEffectpropDeckpropColorpropEnumpropCardTargetActorrequireTruerequireFalserequireEqualrequireNotEqualPropOptionsPropDeckOptionsPropDefRequirement
Memory
memcardtempdeclareMemoryUnchangedsaveRotloadRotsaveVecloadVec
Messages
cooldownsendsendDelayedsendToManysendToManyDelayedsendToSelfsendToSelfDelayedsendToAllbroadcastsendToAllDelayedcallDeckcallActionDeckcallEventDeckdeactivateActionDeck
Player
Camera/Lights
CameraSettingssetCameraSettingssetLightclearLightrequestCameraOffset
Hierarchy
Parenting
attachToParentdetachFromParentisAttachedgetParent
Rendering
Visibility
isVisibleshowhide
Body
getBodyPossetBodyPosgetBodyRotsetBodyRotgetBoundsSizegetBoundsRadiusOutergetBoundsRadiusInnergetBoundsRadiusAveragegetBoundsCenter
Color
setTintsetTintColorsetTintHexgetTintgetTintColorgetTintHex
Scene
SkyTypeSceneLightingModesetSkyTypegetSkyTypesetSkyColorgetSkyColorsetSceneLightinggetSceneLighting
Physics
Presets
PhysicsPresetsetPhysicsPresetgetPhysicsPreset
Attributes
setSolidisSolidsetKinematicisKinematicenableGravityisGravityEnabledenableKeepUprightisKeepUprightEnabledsetBouncinesssetMasssetDragsetAngularDrag
Velocity
getVelocityaddVelocitypush
Casting
raycastraycastTerraincastAdvancedCastHitoverlapSpherecheckBoxCastMode
Collisions
onCollisiononTerrainCollision
Player Controls (high level input)
Actions
onJumponPrimaryActiononSecondaryAction
Controls
isGroundedisSprintinggetWorldThrottlegetThrottlegetRawThrottlegetLookAxessetCameraActorgetCameraActorresetCameraActorisPlayerControllablesetIsPlayerControllablesetControllingPlayergetControllingPlayer
Aiming
getAimTargetgetAimOrigingetAimDirectiongetLastAimHitPoint
Low Level Input
Keyboard
keyIsPressedkeyJustPressedkeyJustReleasedonKeyDownonKeyHeldKeyMessageKeyCode
Mouse
hasPlayerInputgetMouseXgetMouseYmouseIsPressedmousePressedmouseJustPressedmouseJustReleasedgetMouseRayOrigingetMouseRayDirgetActorUnderMousegetActorsUnderMousegetTerrainPointUnderMouseonMouseDownonMouseUponMouseHeldonActorClicked
Multiplayer
Players
isInMultiplayerModegetAllPlayersgetLocalPlayergetPlayerByNumbergetPlayerNickNamegetPlayerNumberplayerExistsisMasterPlayerisClaimedgetPlayerControlledActor
Events
onPlayerJoinedonPlayerLeftPlayerJoinedMessagePlayerLeftMessage
User Interface
Tooltips
Widgets
uiTextuiRectuiCircleuiTriangleuiLineuiButtonuiSpriteuiImageuiImageSliceuiGetTextWidthuiGetTextHeightuiGetScreenWidthuiGetScreenHeightuiGetScreenInfoUiColorShapeStyleRectStyleUiShapeOptionsUiSpriteOptionsUiImageOptionsUiButtonOptionsUiTextOptionsUiScreenInfo
Screen
getScreenPointgetScreenRect
Terrain
Blocks
BlockShapeBlockDirBlockStylesetBlocksetBlockAtPointgetBlockgetBlockAtPointclearBlockclearBlockAtPointgetBlockCoordsAtPointgetBlockCentergetBlockSize
Walls
Sound
SFX
playSoundtryPlaySoundSounds
Particle Effects
ParticleEffects
spawnParticleEffecttrySpawnParticleEffectParticles
Polite Requests
Requests
setPosPleasesetYawPleasesetPitchPleasesetRollPleasesetYawPitchRollPleaseturnPleaseapplyQuaternionPleaseapplyQuaternionSelfPleasesetRotPleaseresetRotPleaselookAtPleaselookDirPleasesetScaleUniformPleasesetScalePleaseattachToParentPleasedetachFromParentPleasesetVarPleasedeleteVarPleasesetDisplayNamePleasesetCommentTextPleasesetSolidPleasesetKinematicPleaseenableGravityPleaseenableKeepUprightPleasesetBouncinessPleasesetMassPleasesetDragPleasesetAngularDragPleasesetPhysicsPresetPleaseaddVelocityPleasesetCameraActorPleasesetIsPlayerControllablePleasesetControllingPlayerPleasesetBodyPosPleasesetBodyRotPleasesetTintColorPleasesetTintHexPleaseshowPleasehidePlease
Misc
Time
deltaTimegetTimegetTimeSinceResetonTickonLocalTickonOffstageTick
Math
vec3degToRadradToDegrevToRadinterpvec3zerovec3onevec3xvec3yvec3zvec3addvec3addXvec3addYvec3addZvec3withXvec3withYvec3withZvec3subvec3scalevec3addScaledvec3negvec3lengthSqvec3lengthvec3normalizedvec3withLengthvec3toStringvec3equal
Colors
colorFromHexcolorToHex
Game
onResetGameonInitresetGame
Util
toFixedLengthdeepCopyloglogError
(Advanced) Cards
Cards
getCardStatusRuntimeCardStatusgetCardErrorMessageonCardRemoved
Reference
GActionCardGActionMessageGEventGEventCard