Creates a wedge (triangular prism) mesh primitive (2x2x1, centered at origin).
Takes textureSlots, uvMode, unique (no configurable parameters).
Returns mesh entity handle or 0 on failure.
3D Graphics
Parameters & Returns
Parameters
textureSlotsInt
uvModeInt
uniqueInt
Returns
Int
Quick Summary
Creates a wedge (triangular prism) mesh primitive (2x2x1, centered at origin).
Takes textureSlots, uvMode, unique (no configurable parameters).
Returns mesh entity handle or 0 on failure.
Technical Exegesis...
Creates a wedge (triangular prism) mesh primitive (2x2x1, centered at origin). Takes textureSlots, uvMode, unique (no configurable parameters). Returns mesh entity handle or 0 on failure. Creates surface-based mesh, adds 6 vertices (3 for front triangle, 3 for back triangle), creates triangular ends and 3 rectangular sides, sets normals, unlocks. Wedge dimensions: base 2x2, front edge at Z=+0.5, back edge at Z=-0.5, height from Y=-1 to Y=+1. Returns mesh entity handle.
Creates a wedge (triangular prism) mesh primitive (2x2x1, centered at origin). Takes textureSlots, uvMode, unique (no configurable parameters). Returns mesh entity handle or 0 on failure. Creates surface-based mesh, adds 6 vertices (3 for front triangle, 3 for back triangle), creates triangular ends and 3 rectangular sides, sets normals, unlocks. Wedge dimensions: base 2x2, front edge at Z=+0.5, back edge at Z=-0.5, height from Y=-1 to Y=+1. Returns mesh entity handle.
This function creates triangular prism (half-box) for ramps, roofs, and slopes. Wedge = extruded triangle (triangular cross-section along Z-axis). Structure: 2 triangular ends (front/back) + 3 rectangular sides (bottom, left-slant, right-slant) = 5 faces. Fixed dimensions: not configurable (use scale for custom size). Flat shading: hard edges between faces. UV mapping: each face gets full UV range. Use cases: (1) Ramps (inclined planes), (2) Roof sections (pitched roofs), (3) Wedge-shaped objects (doorstops), (4) Half-pyramid, (5) Terrain slopes. Common pattern: wedge=b3dCreateWedge(BBR_ONE_SLOT, BBR_TEXTURE_UV, 0), b3dScaleEntity(wedge, w/2, h/2, d), b3dRotateEntity(wedge, 0, angle, 0) for oriented ramp. Normals: perpendicular to each face (bottom flat, sides angled). Vertex count: 12 (6 positions x 2 for hard edges). Triangle count: 8 (2 triangular ends + 6 for 3 rectangular sides). Alternative: b3dCreatePyramid for pointed, b3dCreateCube with vertex modification, custom mesh for different angles. Orientation: triangular faces perpendicular to Z-axis by default, base parallel to XZ plane. Modification: surface-based, editable. Typical use: create ramp by rotating -90 degrees around X-axis, scale to desired slope length/height. Slope angle: 45 degrees by default (can change via non-uniform scaling).