» box2d collision filtering, can it be done?
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

box2d collision filtering, can it be done?

question resolved using-vvvv Physics collision filtering box2d

effe 20/02/12 - 07:33

Hi all,

I've been trying to find some information on whether vvvv's implementation of box2d can handle collision filtering, and I've had some conflicting results.

First, there's this video:http://vimeo.com/9237177 by vux, which seems to demonstrate collision filtering. There's also the main feature list on this website which lists it as a feature.

However, I can't find any node which can do this, or information about said nodes. Also, there's a post by vux from two years or so ago which claims that it hasn't been implemented yet, and isn't a priority.

So I'm confused. Is it that vux has got it working, but just hasn't created a node to handle it yet? Or am I missing something.

Thanks.

6 replies 0 new

link | Flagged as solution by gaz. Remove solution flag. vux (kollaborateur) 20/02/2012 - 13:13

In the shape pins (Box/EdgeChain/Circle/Polygon), you need to set the group index pin to a negative value.

Any objects with the same negative value will never collide between each other.

To update group index on the fly UpdateShape(Box2d) can make you do that.

Thanks heaps, that's very helpful.

Hi again.

That works fine, but I'm wondering now if a slightly more complex interaction would be possible. Is it possible to create something like this:

Group 1: Collides with everything.
Group 2: Collides with Group 1 but not Group 3.
Group 3: Collides with Group 1 and itself, but not Group 2.

As far as I can see, setting negative values only works to stop a group from colliding with itself, not another group.

Thanks.

I did a bit of googling and it seems like it can be done in box2d using maskBit and categoryBit, but I get the impression that these aren't part of vvvv's implementation of Box2d. Am I mistaken?

link | Flag this reply as a solution. vux (kollaborateur) 19/04/2012 - 14:12

Hello, indeed Collision Bits are not there, I'll look to add them for next release thanks.

Awesome.

anonymous user login

Shoutbox

~35min ago

joreg: @tobi: use GetSlice() as the patch i referred you to is demonstrating. or start a forum thread with your patch.

~47min ago

TobiTobsen123: hmm yes i can see the values...but how to handle them as seperate values? I need to forward them via TCP/IP...

~2h ago

joreg: @tobi: OSCDecoder helppatch has a section: OSC_Advanced (bottomright) that demoes decoding of multiple messages

~3h ago

TobiTobsen123: I'm using an OSCDecoder, it receives two arguments...works but how can I seperate the arguments into two seperate values

~5h ago

u7angel: @mediadog, make it a forum question.

~5h ago

u7angel: @mediadog, tty renderer ?

~8h ago

microdee: however non-conductive objects are invisible for this so the pencil and the sticks in the video are still a mysteries

~8h ago

microdee: hey i just found a possible solution behind leap's black magic http://www.quora.com/Leap-Motion/What-is-the-technology-behind-Leap-Motion