Creates a flat disc mesh primitive (radius 1, on XZ plane, centered at origin, facing up).
Takes textureSlots, uvMode, unique, segments (radial subdivision, clamped 3-128).
Returns mesh entity handle or 0 on failure.
3D Graphics
Parameters & Returns
Parameters
textureSlotsInt
uvModeInt
uniqueInt
segmentsInt
Returns
Int
Quick Summary
Creates a flat disc mesh primitive (radius 1, on XZ plane, centered at origin, facing up).
Takes textureSlots, uvMode, unique, segments (radial subdivision, clamped 3-128).
Returns mesh entity handle or 0 on failure.
Technical Exegesis...
Creates a flat disc mesh primitive (radius 1, on XZ plane, centered at origin, facing up). Takes textureSlots, uvMode, unique, segments (radial subdivision, clamped 3-128). Returns mesh entity handle or 0 on failure. Creates surface-based mesh, adds center vertex (0,0,0), generates outer ring vertices in circle, creates triangles from center to ring, sets all normals pointing up (0,1,0), unlocks. Disc dimensions: radius 1, thickness 0 (flat 2D circle on XZ plane at Y=0). Returns mesh entity handle.
Creates a flat disc mesh primitive (radius 1, on XZ plane, centered at origin, facing up). Takes textureSlots, uvMode, unique, segments (radial subdivision, clamped 3-128). Returns mesh entity handle or 0 on failure. Creates surface-based mesh, adds center vertex (0,0,0), generates outer ring vertices in circle, creates triangles from center to ring, sets all normals pointing up (0,1,0), unlocks. Disc dimensions: radius 1, thickness 0 (flat 2D circle on XZ plane at Y=0). Returns mesh entity handle.
This function creates flat circle for ground markers, platforms, and circular decals. Disc = filled circle, single-sided (visible from top only unless backface culling disabled). segments parameter: number of outer vertices around circumference - segments=16 creates 16-sided circle, segments=32 smoother. Clamped 3-128. Structure: center vertex + outer ring + triangle fan. All normals point up (0,1,0) for flat shading. UV mapping: radial - center at (0.5,0.5), outer edge wraps around circle. Use cases: (1) Ground markers (spawn points, target zones), (2) Circular platforms (landing pads), (3) Decals (bullet holes, shadows), (4) Magic circles (spell effects), (5) Radar sweeps, (6) Clock faces. Common pattern: disc=b3dCreateDisc(BBR_ONE_SLOT, BBR_TEXTURE_UV, 0, 32), b3dPositionEntity(disc, x, 0, z) for ground placement. Single-sided: visible from above only (normal points up), invisible from below unless material set double-sided. Vertex count: segments+1 (center + ring). Triangle count: segments. segments=16: 17 vertices, 16 triangles. segments=32: 33 vertices, 32 triangles. Low poly: segments=3 creates triangle, segments=4 creates square (diamond orientation), segments=8 octagon. Alternative: b3dCreateCylinder for thick disc, b3dCreateSphere flattened for dome, custom mesh for ellipse. Rotation: b3dRotateEntity(disc, 90, 0, 0) to face forward (vertical circle). Modification: surface-based, editable. Typical use: scale for custom radius, position at ground level, apply circular texture (alpha for soft edges).