Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

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

AlecJames

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
GetAttributeQuaternion returns the wrong object info?
« on: October 21, 2011, 03:38:41 pm »

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