Skip to content

TurnEntity

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions
Blitz3D

TurnEntity

TurnEntity:Void entity:Int32, pitch:Float32, yaw:Float32, roll:Float32, global:Int32=0
Parameter Mode Type Default Description
entity In Int32 required Entity handle.
pitch In Float32 required Rotation around X in degrees.
yaw In Float32 required Rotation around Y in degrees.
roll In Float32 required Rotation around Z in degrees.
global In Int32 0 1 to turn around the axes of the world instead of the parent. Defaults to 0.

Description

Turns an entity by an amount from its current orientation. Call it every frame with small angles to spin something, such as a coin or a camera that follows the mouse.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
PositionEntity camera, 0, 0, -4
light = CreateLight()
RotateEntity light, 45, 45, 0
cube = CreateCube()
EntityColor cube, 240, 160, 40
While Not KeyHit(1)
	TurnEntity cube, 2, 5, 1
	RenderWorld
	Flip
Wend

Media

TurnEntity

Related Commands

CopyEntity, FreeEntity, HideEntity, MoveEntity, NameEntity, PaintEntity, PointEntity, PositionEntity

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally