Ive got a modelResource of a 'Torso' from one castMember, and
also a model of a 'Right Hand'' from another castMember.
The Torso ModelResource contains a child 'right finger' that
is designed for me to add the 'Right Hand' Model as the child of
this 'right finger'. Then the 'Torso' Model can be Bones animated
and the 'right Hand' model will follow suite.
But when I use addChild to add the 'right hand' model as the
child of the 'right finger' child. It keeps its relative position,
so is out of place.
The trouble is, the 'right hand' model in its own 3D
CastMember, is positioned in the position a right hand would go,
relative to a torso. So, when i add it to the 'right finger' as its
child, its now in the posotion a right hand would go relative to a
torso, but offset from the position and roation of the right
Ive tried using preserveWorld and preserveParent when I use
addChild, but it doesnt have the expected results.
Should i be transforming the 'right hand' model to an origin
point or something like that, before i use addChild? or the other
I think Ive worked out my own problem...
After I attach the model to the parent with addChild, i then
set its transform to transform(). ie.
theChildModel.transform = transform()
Which solves the problem of the child being offset from the
(below is a seperate problem, I'm using a sphere primitive,
so theres no issue with possibly the sphere having an popsitional
offset when i attach it as a child. My previous question was in
relation to when I attach the actual head object, which did have an
But Now, I have a problem with the parent being positioned
incorrectly when I try to use boneplayer to animate it.
I tried to get down to basics, to work out where the position
was first going wrong, and its when i add the bonesPlayer modifier.
These are the simple steps I take...
I copy the Torso model into the 3D world. (this has a bone
structure and a dummy Model in the correct position for head,
Then I create a sphere primitive.
Then I add the sphere as a child of the Torso's child
dummy Model, which I know is the 'head's dummy Model.
That works fine, the sphere is in the correct 'head'
But then when I add the bonesPlayer modifier to the Torso
Model, the sphere jumps to an incorrect position(about in the
middle of the torso model).
Anyone experienced something like this before? Should I be
doing something first before I add the bonesPlayer modifier?
I have a very trimmed down demo of what Im talking about, if
anyone would like to see the code.