Hi,
I'm currently developing a PinBall-like game using Box2D.
In my world, I have bodies that are linked to a path (let's say a spline).
To make a body follow a path, I attach a MouseJoint to it and update the SetTarget() of the MouseJoint each frame with new path coordinates. This seems to work nicely and the collision of bodies with the pinball looks natural as the body is not actually moved by me, but by forces generated through MouseJoint. Is there any better way to do this?
Secondly, I want more control over the rotation of these bodies. For example, I might always want them perpendicular to the spline tangent. I could do this through SetXForm(), but the body would not have an angular velocity. What would be the way to go here?
Thanks in advance,
Zing
P.S. I read in the TODO's you were working on a SplineJoint, but it's not scheduled for release anytime soon right?
I'm currently developing a PinBall-like game using Box2D.
In my world, I have bodies that are linked to a path (let's say a spline).
To make a body follow a path, I attach a MouseJoint to it and update the SetTarget() of the MouseJoint each frame with new path coordinates. This seems to work nicely and the collision of bodies with the pinball looks natural as the body is not actually moved by me, but by forces generated through MouseJoint. Is there any better way to do this?
Secondly, I want more control over the rotation of these bodies. For example, I might always want them perpendicular to the spline tangent. I could do this through SetXForm(), but the body would not have an angular velocity. What would be the way to go here?
Thanks in advance,
Zing
P.S. I read in the TODO's you were working on a SplineJoint, but it's not scheduled for release anytime soon right?