This subject can get quite complicated. How exactly are you interpolating
rotations with matrices in Maya? From a matrix, you have to extract the
rotation matrix, then either convert it to euler rotations or quaternions
before doing any kind of interpolation.

Just calculate the rotations using the euler rotations using lerp. It's the
fastest way to get any kind of interpolation. If you're animating through
the different rotations and you need a smooth interpolation, consider
looking into quaternion slerp or quaternional nlerp.

On Mon, Mar 19, 2018 at 4:06 PM, derek wong <im_derek_w...@hotmail.com>
wrote:

> Hi,
>
> So to start this off, I'm a novice at anything beyond scripting with maya
> commands, so I don't really know what I'm talking about.
>
> In the test I am trying to do, I have 3 cubes (cubeA, cube B, and cubeC).
> I want to be able to rotate cubeC to (x, y, z) rotation, calculate what
> half of the rotational difference between cubeA and cubeC's matrices is,
> and use that to set cubeB's rotations to halfway between cubeA and cubeC's
> rotations.
>
> eg. If cubeA's rotation is (0,0,0) and cubeC's rotation is (100,200,300),
> cubeB's rotation would be (50,100,150)
>
> As far as I've been able to achieve, in the above scenario, my actual
> cubeB's rotation would end up being (50,-160,-60).
>
> I'm trying to do this with matrices because I was told matrix math
> computes faster.
>
> Should I even be trying to do this with matrices? Or is it more logical to
> just use the actual rotation values directly?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/ee8a3775-1b14-4485-8657-
> 262963977112%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/ee8a3775-1b14-4485-8657-262963977112%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAJAkR61PzcPx%2B9q_6NX3nfpNTgAwY38JACL517VEz2oD0HDRaA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to