AS3: limiting pan values to 0-360

Q&A about the latest versions
Post Reply
prism
Posts: 9
Joined: Thu May 22, 2008 1:02 pm

getPan() is continuous and allows negative values, but I'd like it to only allow 0-360, is there any way to get around this without having too much of a dent in the performance?
User avatar
thomas
Chief Gnome
Posts: 2613
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Just make something like

Code: Select all

p=vr.pano.getPan();
if (p<0) p+=360.0;
and you will only have positive values.
MfG, Thomas
Post Reply