Away3D HoverCamera Pan Angle - relative angle out of 360

52 Views Asked by At

I'm trying to work out the percentage of rotation of the HoverCamera but .panAngle() returns any number from -infinity to + inifinity, is there a way to work out the current angle out of 360 instead, no matter how times you rotate the camera?

1

There are 1 best solutions below

0
David O. On

For the mod operator in AS3 you need to check for negative values too:

        angle = angle % 360;
        if(angle<0) angle+=360;