Page 1 of 1
Requesting groupIndex support for Box2D
Posted: Thu Feb 12, 2009 4:39 pm
by Skasi
As my game needs more than 16 different "collision types" I need to be able to use the groupIndex option that Box2D offers.
In return I will use a nice little OBEY Avatar. What do you say?
Re: Requesting groupIndex support for Box2D
Posted: Fri Feb 13, 2009 1:25 am
by counterfactual_jones
I thought the shapedata was (possibly) unique for each shape?
So you do this:
Code: Select all
circle_shape:setData("Ball") -- Set a string userdata
world:setCallback(collision)
then have this:
Code: Select all
function collision(a, b, c)
if a == "Ball" then
-- do something
end
if b == "Ball" then
-- do something
end
end
Re: Requesting groupIndex support for Box2D
Posted: Fri Feb 13, 2009 2:30 pm
by rude
Added.
Re: Requesting groupIndex support for Box2D
Posted: Fri Feb 13, 2009 9:11 pm
by Skasi
counterfactual_jones: It's not about shapedata.
Take a look at
6.2.3. Filtering in the box2D manual for a description.
rude: What did you add? The support? The request to a todo? Tell me.