← Back to 3D Structs
Vector3
⚠️ Experimental - Pre-Release
Vector3 represents a 3D vector with x, y, and z components. Used for positions, directions, velocities, and other 3D values. Used by Transform3D for position and scale.
Fields
x: float
The x component of the vector.
y: float
The y component of the vector.
z: float
The z component of the vector.
Usage Example
@script Player extends Node3D var velocity = new Vector3(5.0, 0.0, 0.0) fn update() { var delta = Time.get_delta() self.transform.position.x += velocity.x * delta self.transform.position.y += velocity.y * delta self.transform.position.z += velocity.z * delta }Related
- Transform3D- 3D transform that uses Vector3
- All 3D Structs
