Hey, I've been struggling with this all day and can't seem to figure it out. I've been working with box2D for a few months now and seem to have a pretty good handle on it, but I'm having a particular problem with polygons.
I'm creating a four level racetrack (platform view, not top-down), each with it's own little car. I'm just using one world for this and dividing up the four tracks with bodies containing simple box shapes. It works great and the little cars zoom along, seemingly on their own tracks.
Recently I decided to add the functionality to make different terrain, so I thought having the track bodies contain polygons. So I made a polygon shape that has a little hill in the middle. I created the polygon CCW and it's showing up in the world, and even falls if I add density, so I know it's been created correctly.
The problem is, the cars don't make contact and all fall through to the bottom, unlike with the simple box. There is no collision between the cars and tracks anymore.
Any idea why this is happening? TIA!
I'm creating a four level racetrack (platform view, not top-down), each with it's own little car. I'm just using one world for this and dividing up the four tracks with bodies containing simple box shapes. It works great and the little cars zoom along, seemingly on their own tracks.
Recently I decided to add the functionality to make different terrain, so I thought having the track bodies contain polygons. So I made a polygon shape that has a little hill in the middle. I created the polygon CCW and it's showing up in the world, and even falls if I add density, so I know it's been created correctly.
The problem is, the cars don't make contact and all fall through to the bottom, unlike with the simple box. There is no collision between the cars and tracks anymore.
Any idea why this is happening? TIA!