Advertisement
Rakoonic

Simple object 3D calculations

Oct 9th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1.  
  2.     -- Create in 3D
  3.     local sourcePoints = self.points
  4.     local z            = viewScale / ( z - zOffset )
  5.     local leftPoint    = ( xOffset - self.halfWidth + x ) * z
  6.     local rightPoint   = ( xOffset + self.halfWidth + x ) * z
  7.  
  8.     -- Create the front
  9.     local top        = ( y - self.y - self.height ) * z
  10.     local bottom     = ( y - self.y ) * z
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement