Typical collision detection
        Posted  
        
            by 
                marcg11
            
        on Game Development
        
        See other posts from Game Development
        
            or by marcg11
        
        
        
        Published on 2012-11-23T12:45:16Z
        Indexed on 
            2012/11/23
            17:20 UTC
        
        
        Read the original article
        Hit count: 382
        
I would like to know how is the typical collision detection of most games. For example, you control a character which can move in 2 dimensional directions (except up and down). Now lets asume he walks into a wall, most of the games depending on character angle and the BB normal face will only stop the player in one axis, but will continue moving in the other along the wall axis. How is that done?
I've only managed to stop the character from going through the wall by seting the position to the last one in the past frame if the new position colllisions the bounding box. But this just makes the player stop sharply and unrealisticly.
© Game Development or respective owner