Sets base texture pivot to center (0.5, 0.5) for centered rotation/scaling.
Takes entityHandle (mesh entity).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
entityHandleInt
Returns
Void
Quick Summary
Sets base texture pivot to center (0.5, 0.5) for centered rotation/scaling.
Takes entityHandle (mesh entity).
Returns nothing.
Technical Exegesis...
Sets base texture pivot to center (0.5, 0.5) for centered rotation/scaling. Takes entityHandle (mesh entity). Returns nothing. Convenience function wrapping b3dSetHandleBaseTexture(entityHandle, 0.5, 0.5).
This function centers pivot. Centered pivot: sets pivot to (0.5, 0.5) in UV space, middle of texture both horizontally and vertically, most common pivot point for natural rotation and scaling, equivalent to calling b3dSetHandleBaseTexture(entityHandle, 0.5, 0.5).
Sets base texture pivot to center (0.5, 0.5) for centered rotation/scaling. Takes entityHandle (mesh entity). Returns nothing. Convenience function wrapping b3dSetHandleBaseTexture(entityHandle, 0.5, 0.5).
This function centers pivot. Centered pivot: sets pivot to (0.5, 0.5) in UV space, middle of texture both horizontally and vertically, most common pivot point for natural rotation and scaling, equivalent to calling b3dSetHandleBaseTexture(entityHandle, 0.5, 0.5). Use cases: (1) Centered texture rotation (spinning decals, rotating UI elements), (2) Centered texture scaling (zoom effects, pulsing textures), (3) Balanced transformations (rotation + scale from center), (4) Common default (most textures rotate naturally from center), (5) Convenience (simpler than manual 0.5, 0.5 entry). Common patterns: spinning texture = b3dSetMidHandleBaseTexture + b3dRotateTexture in loop, zoom effect = b3dSetMidHandleBaseTexture + b3dScaleTexture, pulsing = centered pivot + animated scale, UI rotation = centered pivot for spinning icons. Typical usage: call before rotating or scaling texture, use instead of b3dSetHandleBaseTexture when center wanted, most common pivot choice for texture effects, saves typing and improves code readability. Implementation: simple wrapper calling b3dSetHandleBaseTexture(entityHandle, 0.5, 0.5), no additional logic or overhead, purely for convenience, equivalent functionality to manual setting. Why centered pivot: rotation around center keeps texture visually balanced, scaling from center grows/shrinks symmetrically, matches user expectations for spinning/zooming, corner pivots only needed for special effects (hinges, doors, etc.). Material targeting: affects same material settings as b3dSetHandleBaseTexture, sets entity material.baseTextureRotationPivot to (0.5, 0.5), handles material override, surface-based meshes, loaded meshes, propagates via material dirty flag. Default behavior: without setting pivot, default is (0, 0) bottom-left, default not ideal for most rotations (spins around corner), b3dSetMidHandleBaseTexture fixes this with one call, apply before first rotation/scale for expected behavior. Examples: centered clock rotation, spinning fan blades, zooming UI panels, rotating radar display, pulsing health indicator, balanced scaling effects. Performance: same minimal cost as b3dSetHandleBaseTexture (wrapper call), negligible overhead (simple function call + field set), triggers material upload (once per frame if changing). Validation: inherits validation from b3dSetHandleBaseTexture, checks entity is valid mesh, prints error if invalid handle or not mesh. Alternative: manually calling b3dSetHandleBaseTexture(entity, 0.5, 0.5), b3dSetMidHandleBaseTexture more readable and concise, recommended for common centered case. Related: b3dSetHandleBaseTexture sets custom pivot (any UV coordinates), b3dRotateTexture rotates texture around pivot (uses this pivot), b3dScaleTexture scales texture from pivot (uses this pivot), b3dSetMidHandleDetailTexture centers detail texture pivot (detail version).