Creates a cone mesh primitive (base radius 1, height 2, centered at origin, with bottom cap).
Takes textureSlots, uvMode, unique, segments (base circle 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 cone mesh primitive (base radius 1, height 2, centered at origin, with bottom cap).
Takes textureSlots, uvMode, unique, segments (base circle subdivision, clamped 3-128).
Returns mesh entity handle or 0 on failure.
Technical Exegesis...
Creates a cone mesh primitive (base radius 1, height 2, centered at origin, with bottom cap). Takes textureSlots, uvMode, unique, segments (base circle subdivision, clamped 3-128). Returns mesh entity handle or 0 on failure. Creates surface-based mesh, adds apex vertex (tip at Y=+1), generates base ring vertices (Y=-1), creates side triangles from base to apex, adds bottom cap (center + triangles), sets normals (slanted for sides, downward for cap), unlocks.
Creates a cone mesh primitive (base radius 1, height 2, centered at origin, with bottom cap). Takes textureSlots, uvMode, unique, segments (base circle subdivision, clamped 3-128). Returns mesh entity handle or 0 on failure. Creates surface-based mesh, adds apex vertex (tip at Y=+1), generates base ring vertices (Y=-1), creates side triangles from base to apex, adds bottom cap (center + triangles), sets normals (slanted for sides, downward for cap), unlocks. Cone dimensions: base radius 1 at Y=-1, apex at Y=+1, total height 2. Returns mesh entity handle.
This function creates tapered cone for pyramids, arrows, and pointed objects. Cone structure: triangular sides converging to apex, flat circular base. segments parameter: base circle resolution - segments=16 creates 16-sided cone (approaching circular), segments=3 creates triangular pyramid, segments=4 square pyramid. Clamped 3-128. Apex singularity: all side triangles share apex vertex. Side normals: point outward at slant angle (perpendicular to cone surface). Base cap: flat circle with downward normal. UV mapping: sides wrap around cone (UV coordinates project from apex to base), base uses radial UV. Use cases: (1) Traffic cones, (2) Arrowheads/pointers, (3) Mountain peaks, (4) Party hats, (5) Roof tops (spire), (6) Physics ragdoll joints. Common pattern: cone=b3dCreateCone(BBR_ONE_SLOT, BBR_TEXTURE_UV, 0, 24), b3dRotateEntity(cone, 0, 0, 180) to point downward. Normals: side normals calculated from cone slant (not purely horizontal or vertical). Vertex count: ~2xsegments (apex, base ring, cap center, duplicates). Triangle count: ~2xsegments (sides + cap). segments=16: ~32 vertices, ~32 triangles. segments=32: ~64 vertices, ~64 triangles. Low segments: geometric pyramids (3=triangle, 4=square, 5=pentagon), high segments: smooth cone. Alternative: b3dCreateCylinder for straight sides, b3dCreatePyramid for 4-sided, custom mesh for truncated cone. Capped: includes base cap (closed cone). Modification: surface-based, editable. Apex position: Y=+1, base at Y=-1.