Revision: 6762
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6762&view=rev
Author:   alexcb
Date:     2008-07-04 15:01:25 -0700 (Fri, 04 Jul 2008)

Log Message:
-----------
fixed infinite scrolling bug when camera pitch is 90degrees

Modified Paths:
--------------
    code/stage/trunk/libstage/stage.hh

Modified: code/stage/trunk/libstage/stage.hh
===================================================================
--- code/stage/trunk/libstage/stage.hh  2008-07-04 21:53:04 UTC (rev 6761)
+++ code/stage/trunk/libstage/stage.hh  2008-07-04 22:01:25 UTC (rev 6762)
@@ -1870,6 +1870,12 @@
                        //adjust for pitch angle
                        y = y / cos( dtor( _pitch ) );
 
+                       //don't allow huge values
+                       if( y > 100 ) 
+                               y = 100;
+                       else if( y < -100 ) 
+                               y = -100;
+
                        //adjust for yaw angle
                        _x += cos( dtor( _yaw ) ) * x;
                        _y += -sin( dtor( _yaw ) ) * x;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to