Translates entity in world space (absolute axes, ignores orientation).
Takes entity (entity handle), x (X-axis offset), y (Y-axis offset - positive up), z (Z-axis offset).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
entityInt
xDouble
yDouble
zDouble
Returns
Void
Quick Summary
Translates entity in world space (absolute axes, ignores orientation).
Takes entity (entity handle), x (X-axis offset), y (Y-axis offset - positive up), z (Z-axis offset).
Returns nothing.
Technical Exegesis...
Translates entity in world space (absolute axes, ignores orientation). Takes entity (entity handle), x (X-axis offset), y (Y-axis offset - positive up), z (Z-axis offset). Returns nothing. Validates entity exists, if physicsBodyHandle!=0 calculates new position with Y-negation and routes to b3dSetPhysicsBodyPosition, otherwise adds offsets to entity.position with Y-negation and marks worldMatrixDirty=true. World-space movement (same direction regardless of entity orientation).
Translates entity in world space (absolute axes, ignores orientation). Takes entity (entity handle), x (X-axis offset), y (Y-axis offset - positive up), z (Z-axis offset). Returns nothing. Validates entity exists, if physicsBodyHandle!=0 calculates new position with Y-negation and routes to b3dSetPhysicsBodyPosition, otherwise adds offsets to entity.position with Y-negation and marks worldMatrixDirty=true. World-space movement (same direction regardless of entity orientation).
This function moves entity along world axes. World vs local space: TranslateEntity uses world axes (x=world right, y=world up, z=world forward), movement direction independent of entity rotation (always same world direction), contrast with b3dMoveEntity which moves in local space (direction depends on orientation). Y-axis negation: user +Y=up, internal -Y=up, function negates Y offset: entity.position.x += x, entity.position.y += -y, entity.position.z += z, maintains coordinate system consistency. Physics integration: checks entity.physicsBodyHandle!=0, if physics body present: calculates new position = entity.position + (x, -y, z) (entity.position synced from physics), converts to user coordinates (newX, -newY, newZ), calls b3dSetPhysicsBodyPosition with user coords. If no physics body: updates entity.position directly with Y-negation, marks worldMatrixDirty=true. Use cases: (1) Gravity (translate down in world Y), (2) Conveyor belts (move in world direction), (3) Wind/current (push in world direction), (4) Elevator movement (up/down in world space), (5) Grid-based movement (tile-to-tile translation). Common pattern: b3dTranslateEntity(entity, 0, -gravity, 0) applies downward gravity, b3dTranslateEntity(entity, windX, windY, windZ) applies wind force. Coordinate axes: X=world right (positive right, negative left), Y=world up (positive up, negative down in user space), Z=world forward (positive forward, negative backward). Rotation independence: movement direction same regardless of entity rotation (rotated entity still moves in same world direction), use b3dMoveEntity for orientation-dependent movement (forward in facing direction). Typical usage: apply constant forces (gravity, wind), move platforms/elevators, implement grid-based movement, physics effects in world space. Performance: O(1) operation (simple addition with Y-negation), physics routing more expensive than direct position update. Related: b3dMoveEntity moves in local space (uses orientation), b3dPositionEntity sets absolute position, b3dSetPhysicsBodyPosition for physics-driven positioning.