Physics for moving blocks
        Posted  
        
            by 
                Gabson
            
        on Game Development
        
        See other posts from Game Development
        
            or by Gabson
        
        
        
        Published on 2013-10-24T12:09:42Z
        Indexed on 
            2013/10/24
            16:12 UTC
        
        
        Read the original article
        Hit count: 223
        
I'm working on a 2D game for windows phone where the player moves blocks around to bounce a laser beams.
I need to create some simple physics for moving the blocks.
For the moment I have a simple collision class, telling me if two rectangles collide. But that's not enough because when I'm moving a block the rectangle/rectangle function doesn't work.
By Doesn't work i mean,I manage the collision but I don't how to stop the block mooving while the user sliding the block.
The collision response for the block I want is if the user tries to slide it on another object, the block should slide up against the other object and not overlap.
How would I go about implementing this functionality?
© Game Development or respective owner