Skip to content

UpdateWorld

Narta Xaymar Dirks edited this page Oct 31, 2026 · 6 revisions
Blitz3D

UpdateWorld

UpdateWorld:Void elapsed_time:Float32=1
Parameter Mode Type Default Description
elapsed_time In Float32 1 Animation speed of the whole world: 1 plays animations at their own speed, 2 at double speed, 0.5 at half. Defaults to 1.

Description

Advances the world by one step: moves animated entities on and applies the collision rules, so entities with a collision type are pushed out of the things they hit. Call it once per main loop, before RenderWorld. Without it, animations stand still and collisions never happen.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
light = CreateLight()

wall = CreateCube()
PositionEntity wall, 3, 0, 8
EntityType wall, 2
ball = CreateSphere()
PositionEntity ball, -3, 0, 8
EntityType ball, 1
EntityRadius ball, 1
Collisions 1, 2, 2, 2

While Not KeyHit(1)
	MoveEntity ball, 0.05, 0, 0
	UpdateWorld
	RenderWorld
	Flip
Wend

Related Commands

CaptureWorld, ClearWorld, RenderWorld, TransparencyDistanceSortMode

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally