[SOLVED] Prevent vertical rotation using euler values

Found a solution via a previous post: [SOLVED] Getting Y rotation as 0 - 360 degrees (or -180 to 180)

I’m now sending this as the y rotation and getting the full 360 around the Y axis:

var fwd = this.camera.forward;
var y = Math.atan2(-fwd.x, -fwd.z) * pc.math.RAD_TO_DEG;