Creates a capsule mesh primitive (radius 1, total height 4, centered at origin, rounded ends).
Takes textureSlots, uvMode, unique (no segments parameter - fixed detail).
Returns mesh entity handle or 0 on failure.
3D Graphics
Parameters & Returns
Parameters
textureSlotsInt
uvModeInt
uniqueInt
Returns
Int
Quick Summary
Creates a capsule mesh primitive (radius 1, total height 4, centered at origin, rounded ends).
Takes textureSlots, uvMode, unique (no segments parameter - fixed detail).
Returns mesh entity handle or 0 on failure.
Technical Exegesis...
Creates a capsule mesh primitive (radius 1, total height 4, centered at origin, rounded ends). Takes textureSlots, uvMode, unique (no segments parameter - fixed detail). Returns mesh entity handle or 0 on failure. Creates surface-based mesh, generates cylindrical body (Y=-1 to Y=+1), top hemisphere (centered at Y=+1), bottom hemisphere (centered at Y=-1), sets normals, unlocks. Capsule dimensions: radius 1, cylinder height 2, hemisphere radius 1 on each end, total height 4 (from Y=-2 to Y=+2).
Creates a capsule mesh primitive (radius 1, total height 4, centered at origin, rounded ends). Takes textureSlots, uvMode, unique (no segments parameter - fixed detail). Returns mesh entity handle or 0 on failure. Creates surface-based mesh, generates cylindrical body (Y=-1 to Y=+1), top hemisphere (centered at Y=+1), bottom hemisphere (centered at Y=-1), sets normals, unlocks. Capsule dimensions: radius 1, cylinder height 2, hemisphere radius 1 on each end, total height 4 (from Y=-2 to Y=+2). Returns mesh entity handle.
This function creates pill-shaped capsule for character collision and rounded cylinders. Capsule = cylinder with hemispherical caps (rounded ends). Structure: middle cylinder body + spherical top + spherical bottom. Fixed segments: 48 horizontal segments, 12 rings per hemisphere (predetermined quality, not user-configurable). Smooth everywhere: no hard edges between cylinder and hemispheres (continuous surface). UV mapping: cylindrical projection for body, spherical projection for caps. Use cases: (1) Character collision capsules (physics - represents torso/limbs), (2) Pill models (medicine), (3) Rounded rods/handles, (4) Sausage shapes, (5) Ragdoll physics bones. Common pattern: capsule=b3dCreateCapsule(BBR_ONE_SLOT, BBR_TEXTURE_UV, 0), b3dScaleEntity(capsule, r, h/4, r) for radius r, total height h. Normals: point outward from capsule surface (cylindrical on sides, spherical on caps). Vertex/triangle count: high (due to fixed hemisphere detail) - approximately 1000+ vertices. Total height: 4 units default (cylinder height 2 + hemisphere radius 1 on each end). Collision-friendly: capsule shape ideal for physics (no sharp edges, smooth rolling). Alternative: b3dCreateCylinder for flat caps, b3dCreateSphere for fully round, custom mesh for different end shapes. Modification: surface-based, editable. Typical use: scale to fit character proportions (tall thin for arms, short wide for head).