Forum

Dynamic EdgeChain in Box2D

Hello,

I’m trying to create a dynamic edgechain in box2D. As you can see in the attached patch, I can make it move and keep the ground as it is. As soon as I create new box object to collide with the edgechain, it doesn’t work. There is something to do with a framedelay or the spread somewhere. Hard to say more at that point.

Please have a look and tell me what you think.

Thank you

EdgeChain (Box2d) Test.v4p (39.0 kB)

hi lecloneur i would say you have to reverse the edgechanin spread or make it in other order as the edge change only get objects to collide in one side and you have that side the other way around.

EdgeChain (Box2d) Test.v4p (39.4 kB)

Thanks colorsound, I didn’t notice that the side could change the way it react.

Still stucking on making it dynamic while creating other body at the same time… tricky XD

Regarding the destroy logic, seems you were thinking too complicated maybe. In many cases box2d is a very friendly engine.

EdgeChain (Box2d) Test_1.v4p (37.1 kB)

oh yeah tgd !

thanks a lot, I’m just starting this engine and you were right. Nice solution you provide.

Cheers dude