Hi all,
After some problems with box shapes colliding on "flat" ground, and after reading this thread:
viewtopic.php?f=3&t=3048&start=10
I have implemented a capsule shape as suggested using a box and two circles (as suggested here
viewtopic.php?t=5183)
However I am still getting some unwanted collisions with my capsule shape.
The diagram below shows the problem:

capsule1.png [ 1.28 KiB | Viewed 312 times ]
The arrow indicates where the collision is taking place. Basically my game character (represented by the capsule) can sometimes come to rest on the corner of a "wall" (static body) if the corner of the box shape within the capsule collides with the corner of the wall.
Initially I thought to reduce slightly the width of the box to allow the circles to protrude ever so slightly beyond the width of the box, however this leads to the opposite problem as displayed below:

capsule2.png [ 1.29 KiB | Viewed 312 times ]
In this case the character comes to rest when the under-side of the top circle collides with the wall.
I have tried all sorts of crazy solutions like disabling contacts that impact on the horizontal edges of the box (which doesn't work BTW as it just leads to the second case above) but I just can't seem to figure an "elegant" solution.
I understand that there are no plans to implement a capsule shape (and I imagine this would cause some significant complexities where collision detection is concerned), but I'm wondering if there is some other genius solution to this?
Thanks.
After some problems with box shapes colliding on "flat" ground, and after reading this thread:
viewtopic.php?f=3&t=3048&start=10
I have implemented a capsule shape as suggested using a box and two circles (as suggested here
viewtopic.php?t=5183)
However I am still getting some unwanted collisions with my capsule shape.
The diagram below shows the problem:
Attachment:
capsule1.png [ 1.28 KiB | Viewed 312 times ]
The arrow indicates where the collision is taking place. Basically my game character (represented by the capsule) can sometimes come to rest on the corner of a "wall" (static body) if the corner of the box shape within the capsule collides with the corner of the wall.
Initially I thought to reduce slightly the width of the box to allow the circles to protrude ever so slightly beyond the width of the box, however this leads to the opposite problem as displayed below:
Attachment:
capsule2.png [ 1.29 KiB | Viewed 312 times ]
In this case the character comes to rest when the under-side of the top circle collides with the wall.
I have tried all sorts of crazy solutions like disabling contacts that impact on the horizontal edges of the box (which doesn't work BTW as it just leads to the second case above) but I just can't seem to figure an "elegant" solution.
I understand that there are no plans to implement a capsule shape (and I imagine this would cause some significant complexities where collision detection is concerned), but I'm wondering if there is some other genius solution to this?
Thanks.