LDCad Animation puzzle


RE: Animation puzzle
#2
(2021-03-15, 0:15)Walt White Wrote: As soon as I launch the LUA script, the Axle1 sub-model jumps to a new position on the first frame.  It also loses the 13° rotation that allowed its 14 tooth gear to mesh correctly with the Axle2 gear.
This is how it supposed to work Big Grin

The setRotation function constructs a new rotation matrix (stored in the ori variable).

You then assign this matrix to the type 1 reference line of 'Axle1.ldr' by doing this you will overwrite any existing rotation.

If you want to keep the initial orientation you will need to buffer it in the start event and then multiply it with the one before assigning it to the reference.

But it is much more practical to make sure the reference is orientated correctly while using the 1 0 0 0 1 0 0 0 1 rotation matrix.

You can do that by rotating the parts in the submodel them selves.

You can see this is also the case in my second animation demo video at 2:45

Hope this clears things up.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Animation puzzle - by Walt White - 2021-03-15, 0:15
RE: Animation puzzle - by Roland Melkert - 2021-03-15, 19:51

Forum Jump:


Users browsing this thread: 1 Guest(s)