QUOTE(failure @ 11/16/05, 04:45 PM)
I must admit I don't really understand where's the problem. If you just need to replace the object then unparent the exsiting shape from the transform node and parent a new shape to it.
Often when explaining hierarchies people tend to simplify things by covering only the translation part which is really straightforward. Issues are mostly caused by rotation and scaling
Suppose we have 3 transform nodes T1, T2, T3 each definig its own local space using respective transformation matrices M1, M2, M3. Now if we parent T2 to T1 and T3 to T2 we get a hierarchy:
world > T1 > T2 > T3
T3's world matrix is therefore defined as
WM3 = M1 * M2 * M3
Have in mind that WM3 accumlates transformations of all transforms that are above it in hierarchy. And we are not talking only about translation of the origins here. Local spaces can be nonuniformly scaled and rotated on all levels above in hierarchy. So if you animate M3 while M1 and M2 have local scales and rotations animated, your local M3 and world WM3 could look quite a bit differnet.
When you have M3 parented into hierarchy you see the results of WM3 transformations. When you unparent it you see the results of M3 transformations only.
Where's the problem?
[snapback]219897[/snapback]
That's exactly what is seems like it should be. But occasionally, it doesn't seem to work that way. If you know of a way I could get a simple scene to you which contains two objects exhibiting the problem you would see it. Also, I figured out a work around for the problem for now. I read the value when it is parented, then I unparent, and reparent and there is a new value. I just subtract the differing values and offset the animation curves by this amount and it is all fixed. By the way, there is no problems with the rotation or scale. It is only translate.