← Back to 3D Structs
Transform3D
⚠️ Experimental - Pre-Release
Transform3D represents a 3D transform with position, rotation, and scale. Used by Node3D and all 3D nodes for positioning and transformation.
Fields
position: Vector3
The 3D position of the transform.
rotation: Quaternion
The rotation as a quaternion.
scale: Vector3
The scale factors for x, y, and z axes.
Usage Example
@script Player extends Node3D fn update() { // Access transform fields self.transform.position.x = 10.0 self.transform.position.y = 5.0 self.transform.position.z = 0.0 self.transform.scale.x = 1.5 self.transform.scale.y = 1.5 self.transform.scale.z = 1.5 }Related
- Vector3- Used for position and scale
- Quaternion- Used for rotation
- Node3D- Node that uses Transform3D
