Skip to content

CreatePivot

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

CreatePivot

CreatePivot:Int32 parent:Int32=0
Parameter Mode Type Default Description
parent In Int32 0 Entity the pivot follows, or 0 for none. Defaults to 0.

Returns: The handle of the new pivot.

Description

Creates an invisible entity that only has a position, rotation and scale. Pivots are the glue of a scene: parent other entities to one and you can move, turn or scale the whole group, or make something orbit by offsetting it from a pivot that you turn. The pivot is created at the origin, even when it has a parent.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
PositionEntity camera, 0, 3.5, -6
RotateEntity camera, 30, 0, 0
light = CreateLight()
RotateEntity light, 45, 45, 0
pivot = CreatePivot()
moon = CreateSphere(12, pivot)
ScaleEntity moon, 0.4, 0.4, 0.4
PositionEntity moon, 3, 0, 0
planet = CreateSphere(16)
EntityColor planet, 80, 160, 255
EntityColor moon, 220, 220, 220
While Not KeyHit(1)
	TurnEntity pivot, 0, 6, 0
	RenderWorld
	Flip
Wend

Media

CreatePivot

Related Commands

CopyEntity, CountChildren, EntityAlpha, EntityAutoFade

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally