Hi people.
I have ball connected by join like this
http://img42.imageshack.us/img42/456/20091204204036.png
I want to implement collision with join line.
How to do it?
Collistion with join in Box2d or chipmunk
(4 posts) (3 voices)-
Posted 2 years ago #
-
What do you mean exactly? You want the "join" line to act like a shape, meaning other shapes should bounce off it? Or do you just need to know if a point/touch has hit the "join" line.
If you need it to be a shape, in chipmunk you would just use a segment, make sure its in the same group as the circles and just use pivot joints to connect it all together.
If you need it to just be able to know if a point is touching it, then thats a somewhat simple calculation (let me know if you want it).
Posted 2 years ago # -
USe this code ,
cpJoint ; //take this global
joint = cpPinJointNew(bodyA, bodyB, cpv(0, 0), cpv(0, 0));
cpSpaceAddJoint(space, joint);this may help you
Posted 2 years ago # -
>You want the "join" line to act like a shape,
Yes it is that i wantPosted 2 years ago #
Reply
You must log in to post.