Notifications
Clear all

[Closed] How to access gimbal roation values?

I need to create a crude camera animation exporter. I have the pos and rot values at each frame being exported.

The issue I’m having is that max displays rotations for any given frame are in the range of +0 to +180 and -0 to -180(world reference). This causes flipping in the destination software package, where the camera may rotate around the long way instead of going from say 170 to -190 via +180/-180.

If you select the ‘Gimbal’ reference co-ordinate system, rotations are represented continuously. This is the data I’m after. Unfortunately, the ‘Gimbal’ co-ordinate system is not available in Maxscript as far as I can tell. The raw key values are also in continuous form, however I don’t know of any way to get the interpolated frames in between the keys(I’m exporting every frame).

Any ideas on how to get continuous angle values? For example, a counter-clockwise rotation
that loops around might look like: ( 45, 190, 280, 375, 450, 690…etc.) rather than: ( 45, -170, -80, 15, 90, -30) which confuses the destination animation package.

Thanks for any insights.

1 Reply

So I was able to answer my own question.

Here is what worked:

at time t rot_out_z = cam_copy.rotation.controller.z_rotation