Message 1 of 2
[API] Rotate view in global coordinates

Not applicable
01-26-2019
10:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I'm using this code to achieve view rotation:
https://adndevblog.typepad.com/manufacturing/2014/11/rotate-camera-around-any-axis-any-angle.html
Basically it transforms Camera.Eye and Camera.UpVector by rotation matrix created from given vector (the rotation axis), angle and point.
Let the vector be [1,0,0] so it means rotation by X axis.
However applying rotation (transform) to the camera object causes the part to rotate around its local X axis. So if I change starting orientation of the part, it revolves around its local X axis which is now different.
I need to rotate the part around fixed axis (global X axis irrelevant of current part orientation).
How can I accomplish this?
Regards,
Evan