Skip to content

Instantly share code, notes, and snippets.

@owmo-dev
owmo-dev / gist:3eb6b492c724b794a424d1c5818c9f9b
Last active November 10, 2023 17:44
OrbitCamera Volumetric Cloud Rotation
// Get the orientation from OrbitCamera
const orientation = new T.Vector2(0, 0);
const position = new T.Vector3();
position.copy(controls.object.position);
let y = M.atan2(-position.x, -position.z);
if (y < 0) y += M.PI * 2;