Problem with the simplest of things - rectangles.

Topics: Developer Forum, Project Management Forum, User Forum
Sep 23, 2012 at 4:29 PM
Edited Sep 23, 2012 at 4:30 PM

I have a weird problem that I can't solve no matter what I do.

I create bodies, one for player, and several for floor. But when player stands on it he falls through half way. As if the player is just a dot, and floor is in the middle.

Here's the pic

http://s018.radikal.ru/i518/1209/c5/c9bac220ca09.jpg

 

I create bodies using factories as shown in many tutorials, I just don't understand what I'm doing wrong.

And here's my code related to physics

http://pastebin.com/jPBspUvk

Sep 23, 2012 at 11:52 PM

Use the DebugViewXNA to find out if there really is collision or there is a discrepancy between physics and graphics.