Assigning T2DAnimationData to a component
by Andre Clark · in Torque X 2D · 07/18/2008 (12:40 am) · 0 replies
In Torque X, I want to set the T2DAnimationData of a component in code, but I can't figure out a straight forward approach.
Let's say I have my PlayerActorComponent, Play1.
I want to set the RunAnim for Play1 in a function.
I've tried:
Play1.RunAnim = TorqueObjectDatabase.Instance.FindObject("RunAnimation");
Where "RunAnimation" is the name of the animation data block created in the TGB.
I've tried a few other things that seemed straight forward, but nothing seems to work. Is there an easy way to change this property?
Any insight would be greatly appreciated.
Let's say I have my PlayerActorComponent, Play1.
I want to set the RunAnim for Play1 in a function.
I've tried:
Play1.RunAnim = TorqueObjectDatabase.Instance.FindObject
Where "RunAnimation" is the name of the animation data block created in the TGB.
I've tried a few other things that seemed straight forward, but nothing seems to work. Is there an easy way to change this property?
Any insight would be greatly appreciated.