Skip to content

CreateCylinder

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

CreateCylinder

CreateCylinder:Int32 segments:Int32=8, solid:Int32=1, parent:Int32=0
Parameter Mode Type Default Description
segments In Int32 8 Detail of the cylinder, 3 to 100. Defaults to 8.
solid In Int32 1 1 for a cylinder with ends, 0 for a tube. Defaults to 1.
parent In Int32 0 Entity the cylinder follows, or 0 for none. Defaults to 0.

Returns: The handle of the new cylinder.

Description

Creates a cylinder with a radius of 1 that stands along the Y axis from -1 to 1. With solid set to 0 the top and bottom are left open and you get a tube. 3 segments make a prism, 8 is about the smallest that still reads as round and 16 looks smooth. Valid values are 3 to 100.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
PositionEntity camera, 0, 2.5, -8
RotateEntity camera, 18, 0, 0
light = CreateLight()
RotateEntity light, 45, 45, 0
closed = CreateCylinder(16)
PositionEntity closed, -1.6, 0, 0
EntityColor closed, 120, 220, 120
tube = CreateCylinder(16, 0)
PositionEntity tube, 1.6, 0, 0
EntityColor tube, 220, 120, 120
EntityFX tube, 16
RenderWorld
Flip
WaitKey

Media

CreateCylinder

Related Commands

CreateCone, CreateCube, CreateMesh, CreateMirror, CreatePlane, CreateSphere

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally