Hi guys,
first of all thanks for this amazing library! It was not easy to get into box2d but I just love it now 🙂 I downloaded it 4 days ago and integrated into a game I'm working on. It's a boat racing game, so there is no gravity in my world, I'm using box2d to do the collisions in-between the boats and some other dynamical objects and then a lot of static "edges" that describe the track. I'm using 2.1.2 version of box2d.
I already have few questions considering the performance and hope you would help me. I'm real noob when it comes to physics so some of my questions may be very easy for you 🙂
Which shape is better to be used for simple dynamic objects, box or sphere? I assume it's a sphere as the collision calculation would be faster on that, am I right? Can you estimate how much more it takes to collide 10 dynamic objects of a box and then of a circle shape? I'm asking as it would be nice to use box shape, as then I have a nice rotation of the box after the collision as well, which is not the case with sphere shape.
As I mentioned the track is described with "edges", using the SetAsEdge method of b2PolygonShape. Is this the best solution or would it be worth describing the surrounding of the track using convex polygons? I'm not sure if providing the information in this form can help box2d solve the collisions faster or easier?
Thanks a lot for your time and I'll post some video later 😉
first of all thanks for this amazing library! It was not easy to get into box2d but I just love it now 🙂 I downloaded it 4 days ago and integrated into a game I'm working on. It's a boat racing game, so there is no gravity in my world, I'm using box2d to do the collisions in-between the boats and some other dynamical objects and then a lot of static "edges" that describe the track. I'm using 2.1.2 version of box2d.
I already have few questions considering the performance and hope you would help me. I'm real noob when it comes to physics so some of my questions may be very easy for you 🙂
Which shape is better to be used for simple dynamic objects, box or sphere? I assume it's a sphere as the collision calculation would be faster on that, am I right? Can you estimate how much more it takes to collide 10 dynamic objects of a box and then of a circle shape? I'm asking as it would be nice to use box shape, as then I have a nice rotation of the box after the collision as well, which is not the case with sphere shape.
As I mentioned the track is described with "edges", using the SetAsEdge method of b2PolygonShape. Is this the best solution or would it be worth describing the surrounding of the track using convex polygons? I'm not sure if providing the information in this form can help box2d solve the collisions faster or easier?
Thanks a lot for your time and I'll post some video later 😉