Tween joints

Hi,

Im new to the WCK and have spend most of my day fixing this little problem.

I three joints attached to a box (just like the PlatformSwing in the demo). What i want to do is to animate the box with manual keyframes, but still allow the physical rotation of the box.

I have tried with type of the box set to "Animated", but then it does not rotate anymore.

I have attached a drawing to show what i mean.

Any help is highly appreciated 🙂

Thanks!
@Chew I couldn't get a tween to work on a joint either. Maybe you could put the animated MC on top of the box and have it follow the b2Body as it swings. But you may get some lags (viewtopic.php?f=19&t=7251). Also matching the rotation could be a pain.

Hmm, I guess this post wasn't that helpful.
This is a tough scenario to implement. My first thought is to set the two joints up as distance joints and then manually tweak the length of the distance joints to move it up and down like so:

Code:
(b2joint as b2DistanceJoint).m_length += 1;


Setting the length of distance joints isn't officially supported but I think it works.

Original thread: https://box2d.org/forum/viewtopic.php?t=7244