how to perform collision detection in a 3d pyopengl & pygame environment.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Code Bug
    New Member
    • Apr 2012
    • 3

    how to perform collision detection in a 3d pyopengl & pygame environment.

    Obviously collision detection in 3d is/can-be complicated, but I just need some ideas on how to take the 2d perspective of a 3d scene, and use that to allow the user to interact with objects.
    pseudocode:

    Code:
    for scene:
        two_dim = get 2d version (all objects now have only 2d coords)
    
        return two_dim 
    
    #then I could use two_dim to find the position of the   #mouse, and if there is a "collision", the user can drag #the object around. I am unsure how to get the #translated version of a 3d scene as a two dimensional #one, using the perspective of the camera.
Working...