Hi all,
I'm total Box2D newb so this is probably me doing something really stupid. I'm generating a world made up of loads of boxes (well, tiles really). When I implemented the Box2D object creation stuff, the level loading started taking a *REALLY* long time. What was a couple of seconds is now 20-30 seconds.
When I ran a profiler on the code, it said that 78% of the time was taken up with b2DynamicTree::ComputeHeight. All I'm doing is calling CreateBody and CreateFixture (passing in the shape) for each object. There are a *lot* of objects but I wasn't expecting this much slow down during the creation of the objects.
Any ideas?
Luke.
I'm total Box2D newb so this is probably me doing something really stupid. I'm generating a world made up of loads of boxes (well, tiles really). When I implemented the Box2D object creation stuff, the level loading started taking a *REALLY* long time. What was a couple of seconds is now 20-30 seconds.
When I ran a profiler on the code, it said that 78% of the time was taken up with b2DynamicTree::ComputeHeight. All I'm doing is calling CreateBody and CreateFixture (passing in the shape) for each object. There are a *lot* of objects but I wasn't expecting this much slow down during the creation of the objects.
Any ideas?
Luke.