Skip to content

CreateCube

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

CreateCube

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

Returns: The handle of the new cube.

Description

Creates a cube that reaches from -1, -1, -1 to 1, 1, 1, so its edges are 2 units long, and returns it as a mesh entity. Cubes are the standard placeholder for anything that is not modeled yet. Scale it with ScaleEntity for boxes of any proportion.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
PositionEntity camera, 0, 1.5, -5
RotateEntity camera, 15, 0, 0
light = CreateLight()
RotateEntity light, 45, 45, 0
cube = CreateCube()
TurnEntity cube, 0, 35, 0
EntityColor cube, 90, 190, 240
RenderWorld
Flip
WaitKey

Media

CreateCube

Related Commands

CreateCone, CreateCylinder, CreateMesh, CreateMirror, CreatePlane, CreateSphere

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally