Jump to content
Sign in to follow this  
Prospero

Scripted rotations

Recommended Posts

Hi all,

Many people have asked whether an object's pitch and roll (as well as yaw, or direction) can be specified using a script. And up till now, although I have been able to determine the yaw, pitch and roll of any object (via script), I have never been able to _set_ an object's pitch and roll. However, now that I've finally got my hands on O2 (I'm a scripter, not a modeller!wink.gif, I suspect that there may be a way:

Firstly, you have to make a "special" version of the object in question. It would be identical to the original, except that you define the object as the "turret" of an invisible base object, this turret being assigned pitch and roll axes. You then use the recently introduced animation phase commands to provide you with the ability to set pitch and roll. Yaw is achieved in the normal fashion via setDir.

I have experimented with door position-setting scripts which work very well. I see no reason why this method could not be expanded.

Thoughts?

Prospero

Share this post


Link to post
Share on other sites

A follow-up whilst it occurs:

Some people have wondered how to do translation animations instead of rotation animations. It is fairly obvious, but I may as well point out that if you displace the axis of rotation away from the object, you can of course achieve a fairly effective translation by a rotation. So, sliding doors etc.

Prospero

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×