Animating mechanisms (Datasmith)

Hi. I have a datasmith scene / meshes imported into unreal that I would like to animate. It is a simplified V8 engine. All I need is to animate the spinning crankshaft and move the pistons accordingly. In something like Inventor it’s a very easy task, adding some joints / constraints. I’ve first tried using physics constraints but that got me nowhere as it seems to use the objects’ mass even though I have the checkbox off and so the whole thing is jerky. I then tried using timeline animations and have a simple sinusoidal timeline for the pistons to move +1 / -1 every second connected to a LocalOffset. That kind of works, but I see the location of the piston drifting off from it’s start point after a while, as if the timeline were to be running in the background no matter what at a fixed rate while the location/rendering of the pistons is dependent on framerate or something else.
This whole thing will be used in sequencer afterwards.

The question is - what would be the simplest, least time consuming way to animate such an interlocked mechanism? What would be the “right” way? I’ve found a few answers online but none really worked since there are more than a couple of parts here.

For the drift issue, are you adding/removing to the last value? Always working based on the current value? I would more use a unchanging rest transform and add a variating delta every frame.

The most elegant solution, but not the spimplest if you are not familiar with animation and that system, is control rig

I am not a specialist but there is a way to have a control rig without a skeletal mesh. You need to use the control rig component and the mapped component

Thank you, I’ll look into this.
It is currently set up like this:


One mistake I made was to not test this blueprint directly in Sequencer - it’s possible the drift issue would disappear there, as I’ve only tried it by simulating the game (ALT+P) in the editor.

I think Those two, since you are adding many small deltas over time, are prone to accumulate precision errors.

it would be better to do a “set” and recompute position just based on current time.