transform.set_tsr not setting camera tsr properly
16 November 2016 17:03
Hi,
Using version 16.10, I've been trying to move around the camera programmatically with m_transform.set_tsr, or m_transform.set_rotation + m_transform.set_translation
but the viewed result is wrong and when I check m_transform.get_tsr the values are not what I had set.
Ex:
I had gotten the values in from_values by using the webplayer's mouse controls and checking get_tsr
Am I doing something wrong?
Thanks,
Using version 16.10, I've been trying to move around the camera programmatically with m_transform.set_tsr, or m_transform.set_rotation + m_transform.set_translation
but the viewed result is wrong and when I check m_transform.get_tsr the values are not what I had set.
Ex:
var tsrVals = m_tsr.from_values(0, -1.78, 1.7, 1, 0.67, 0.004, 0.004, 0.73);
m_transform.set_tsr(camObj,tsrVals);
m_transform.get_tsr(camObj);
=[0, -1.7799999713897705, 1.7000000476837158, 1, 0.39327535033226013, 1.9755828917222829e-10, 4.1443098952598234e-10, 0.9194207191467285]
I had gotten the values in from_values by using the webplayer's mouse controls and checking get_tsr
Am I doing something wrong?
Thanks,
18 November 2016 18:57
Hi. What's the type of your camera? TARGET, EYE and HOVER cameras are always vertically aligned to keep the head up. The orientation is corrected automatically when you set the rotation/tsr for these cameras. If you want to roll the camera relatively to the UP-axis you should use the STATIC type - it suits better for the procedural animation. Also, you can switch between camera types whenever you need to animate (STATIC) or to use standard controlling mode (the other types).\
P.S. This documentation page can be useful for you: link
P.S. This documentation page can be useful for you: link
21 November 2016 17:07