EdgeShapes (aka Thin Line Segments)

I haven't tried it, but you may find this thread helpful:
viewtopic.php?f=8&t=1748
shaktool wrote:
Line Segments are only allowed to be static. So you can only attach them to the ground body


Why is this? I find this a limitation. Would it not be better if you could add these segement loops as static bodies? So you can reference them as a b2Body and destroy them individually?
That limitation has been lifted for the C++ version. Whenever somebody gets around to porting that back to AS3, the problem will be solved.
shaktool wrote:
That limitation has been lifted for the C++ version. Whenever somebody gets around to porting that back to AS3, the problem will be solved.


Great news, I look forward to it!
This is pretty impressive!

I created a half pipe using SVG with straight lines (16 vertices, updated Settings).

I can see that the half pipe has been created via debug draw. My body (simple circle), falls on the Mesh(?) and bounces but on next contact with the mesh, it sinks and goes to sleep.

I was just wondering if there is any obvious reason why i might be experiencing this issue?
I don't know why it would do that.

Are you using the latest version? The Flash SVN repository has recently been updated with the addition of EdgeShapes. Those should work a little better than the old StaticEdgeShapes, though that might be unrelated to your problem.

Another thing to try is mirroring the half pipe over some axis. If the problem persists, could you upload your SVG and/or your source code?
Hi Shaktool,

Thanks for your response. In all honesty it is likely my own fault. Im still fairly new to SVN etc. Having downloaded the latest i can deffo say that i am behind in the game. Even my basic "engine" class is out of date with the latest updates.

Ill rework it today and try a similar experiment later to see if i still have the issue. It is likely i wont.

I must surely get the award for the worst posts on the forum!
Hi Shaktool

I'm using the latest version of box2d from the repository and I'm having some tunneling issues with static edges. I have a game where small bullets (circles with a radius of 2 units) traveling at around 5 units per frame are quite often tunneling through edges. The bullet bodies have isBullet set to true.

I didn't have any issues at all like this using the version zipped up in the first post in this thread so I'm pretty sure I've got the edges setup in the correct direction for islands and boundaries.

Any ideas would be much appreciated

Cheers
Perhaps I have introduced a bug. Testbed examples are the easiest way for me to debug problems like this. I'd appreciate it if you could help me make EdgeShapes better.
shaktool wrote:
Perhaps I have introduced a bug. Testbed examples are the easiest way for me to debug problems like this. I'd appreciate it if you could help me make EdgeShapes better.


I can try and throw together a testbed example which highlights the bug (if it is indeed a bug!)



I can't reproduce the problem in the testbed so it must be something I'm doing wrong. Odd that my code worked before the update though. I'll keep testing and post back soon if I can find anything.

Do the edges still need to be attached to the ground body?? Can there not be a separate body for each set of vertices?

Original thread: https://box2d.org/forum/viewtopic.php?t=1437