Sets detail texture rotation/scale pivot point in UV space (0.0-1.0 range).
Takes entityHandle (mesh entity), textureHandle (detail texture to configure), u (horizontal pivot 0.0-1.0), v (vertical pivot 0.0-1.0).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
entityHandleInt
textureHandleInt
uDouble
vDouble
Returns
Void
Quick Summary
Sets detail texture rotation/scale pivot point in UV space (0.0-1.0 range).
Takes entityHandle (mesh entity), textureHandle (detail texture to configure), u (horizontal pivot 0.0-1.0), v (vertical pivot 0.0-1.0).
Returns nothing.
Technical Exegesis...
Sets detail texture rotation/scale pivot point in UV space (0.0-1.0 range). Takes entityHandle (mesh entity), textureHandle (detail texture to configure), u (horizontal pivot 0.0-1.0), v (vertical pivot 0.0-1.0). Returns nothing. Sets material.detailTextureRotationPivot[i] for detail texture layer.
This function sets detail pivot.
Sets detail texture rotation/scale pivot point in UV space (0.0-1.0 range). Takes entityHandle (mesh entity), textureHandle (detail texture to configure), u (horizontal pivot 0.0-1.0), v (vertical pivot 0.0-1.0). Returns nothing. Sets material.detailTextureRotationPivot[i] for detail texture layer.
This function sets detail pivot. Detail texture pivot: point around which detail texture rotates and scales, independent of base texture pivot, per-layer setting (each detail texture has own pivot), textureHandle identifies which layer to configure. Layer identification: searches material.detailTextureIndex[0-2] for matching textureHandle, finds layer index and sets detailTextureRotationPivot[index], no effect if textureHandle not found in material, supports up to 3 detail layers with independent pivots. UV space: same as base texture (0.0-1.0 range), u = horizontal (0.0 = left, 1.0 = right), v = vertical (0.0 = bottom, 1.0 = top), (0.5, 0.5) is center (most common for rotation). Rotation/scaling: used by b3dRotateDetailTexture and b3dScaleDetailTexture, affects only the specified detail layer, base texture pivot and other detail layers unaffected, allows complex multi-layer texture effects. Use cases: (1) Rotating detail decal around center, (2) Scaling detail from specific point, (3) Animated detail transformations, (4) Independent layer pivots (layer 0 centered, layer 1 corner), (5) Complex multi-layer effects. Common patterns: centered detail rotation = set pivot (0.5, 0.5) before rotating, corner hinge effect = pivot (0, 0) for detail door/window, multi-layer animation = each detail has own pivot and rotation, decal placement = custom pivot based on decal feature position. Typical usage: call after adding detail texture to entity, set before rotating or scaling detail texture, use b3dSetMidHandleDetailTexture for common centered case, configure each detail layer independently if using multiple layers. Material targeting: finds detail layer by textureHandle (not index), sets material.detailTextureRotationPivot[layer_index], handles material override, surface-based meshes, loaded meshes, propagates via g_materialPropertiesDirty flag. Shader behavior: pivot used in detail texture matrix calculation, each detail layer has separate transform matrix, detail transforms independent of base texture transforms, all transforms combined and uploaded to GPU. Multi-layer support: entity can have up to 3 detail textures, each can have different pivot point, example: layer 0 centered (0.5, 0.5), layer 1 corner (0, 0), layer 2 custom (0.7, 0.3), allows complex layered effects. Default pivot: detail textures default to (0, 0) pivot if not set, not ideal for rotation (same as base texture), explicitly set for expected rotation/scaling behavior, or use b3dSetMidHandleDetailTexture for centered pivot. Transform independence: detail pivot independent of base pivot, detail rotation independent of base rotation, detail scale independent of base scale, allows base centered + detail corner, or any combination. Examples: (0.5, 0.5) center pivot for balanced detail rotation, (0, 0) corner pivot for hinged detail element, (0.75, 0.25) custom pivot for specific feature in detail texture, different pivots per layer for complex effects. Performance: minimal cost (field assignment + material upload), same as base texture pivot setting, no per-pixel cost difference, only affects transform matrix calculation. Validation: checks entity is valid mesh, searches for textureHandle in detail layers, no effect if texture not found (silent), no error for u/v values (any float accepted). Texture search: searches all 3 detail slots (indices 0, 1, 2), sets pivot for matching layer only, multiple details can have different pivots, order doesn't matter (identified by handle). Related: b3dSetMidHandleDetailTexture centers detail pivot (convenience wrapper), b3dSetHandleBaseTexture sets base texture pivot (independent), b3dRotateDetailTexture rotates detail around pivot (uses this pivot), b3dScaleDetailTexture scales detail from pivot (uses this pivot).