Linking animations with the "PARENT" syntax

GregBurch

Addon Developer
Addon Developer
Donator
Joined
Mar 24, 2008
Messages
977
Reaction score
0
Points
0
Location
Space City, USA (Houston)
I thought I had a pretty good handle on how to make the rotation point of one animation component move as a function of another animation component. But I'm having hell doing it on the addon I'm currently developing. Here's the problematic code:
[ANIM_SEQ_0]
; MAIN DOCKING TUBE DEPLOY
KEY=G
DURATION=5

[sinp]

[ANIM_SEQ_8]
; HATCH FRONT
KEY=6
DURATION=6

[snip]

[ANIM_COMP_0]
;
SEQ=0
GROUPS=10,13,14,15,16
RANGE=(0,1)
TYPE=TRANSLATE
SHIFT=(0,0,1.142)

[snip]

[ANIM_COMP_15]
;
SEQ=8
GROUPS=13,14,16
RANGE=(0,1)
ROT_PNT=(-0.3917913,0,11.24845)
ROT_AXIS=(0,1,0)
ANGLE=90
PARENT=0
This is supposed to describe a docking tube that extends forward along the Z axis, and a hatch at the front of the tube that rotates along the Y axis. When I activate the translation component, the hatch extends more Z+ than it should, and it's rotation point becomes seriously mangled -- so far, I'm not sure where it ends up, but it's not in the right place.

Any help would be GREATLY appreciated.

GB
 

Xantcha

Addon Developer
Addon Developer
Joined
Mar 26, 2008
Messages
203
Reaction score
0
Points
0
Try to remove groups 13 14 16 from component 0 definition.

Here's why:
Every transformation component is applied to its every meshgroup. If component have a parent than that parent transformation is applied to those meshgroups first.
In your case animation component applied to each defined mesh group (10,13,14,15,16) and moves them some distance.
Then component 15 is applied to rotate that group by few degrees, but first it applies a parent to its groups (13,14,16). And those three groups are again moved by same distance and only after that are rotated. The effect is that groups 13.14.16 are moved twice the length

Hope I get it right and that will help
 
Top