// Orientation in world-space public WRot WorldOrientation(Actor self) { // Hack: turretFacing is relative to the world, so subtract the body yaw var world = WRot.FromYaw(WAngle.FromFacing(TurretFacing)); if (QuantizedFacings == 0) { return(world); } // Quantize orientation to match a rendered sprite // Implies no pitch or yaw return(WRot.FromYaw(body.QuantizeFacing(world.Yaw, QuantizedFacings))); }