Permalink
Browse files

added camera orientation

  • Loading branch information...
1 parent f2e696e commit e1d1fbf599b995a31a8cde767dc4f5bb6091d4c2 @beanieboi beanieboi committed Dec 10, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 Movable.rb
View
@@ -31,6 +31,10 @@ def radians
(self.orientation * Math::PI / 180) || 0
end
+ def camera_orientation
+ (orientation - 90) % 360
+ end
+
def move(turn = nil)
# First of all rotate
glRotatef(self.orientation, 0, 0, 1)

0 comments on commit e1d1fbf

Please sign in to comment.