Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: GetAttributeQuaternion returns the wrong object info?  (Read 11417 times)

AlecJames

  • Full Member
  • ***
  • Posts: 240
    • View Profile
GetAttributeQuaternion returns the wrong object info?
« on: October 21, 2011, 11:38:41 am »

This is a scene script.  I have a rotating shaft with 36 spikes sticking out of it (36 instances of a spike object).  The shaft is the parent of the spikes.  As the shaft rotates the spikes rotate with it.  The spike has a morph target.  Im just working with one spike to try to get this working. As the shaft rotates the spikes hit an object at 12 o'clock above the shaft - I want the spikes to bend as they go past it, hence the morph target. The scene is 3s long, the shaft only rotates during the middle second.

I have an ASL script in the spike morph target controller. This script calls GetAttributeQuaternion("ShaftObject","orientation").  From the result I calculate the yaw angle, when it's between 350 and 10 degrees I set the morph target to true.  The problem is that the GetAttributeQuaternion call returns info saying the shaft is rotating when its not, i.e. during seconds 0 and 2.  The rotation information appears to be related to another object that is moving idependantly in another part of the scene (its a rectangular block falling from the top to the bottom of the scene.).

I rebuilt the scene with the minimum number of objects and it works as I expect.  Looks like a bug to me :(   
Has anyone seen something similar and know of a work around? 
Thanks
A





Logged