Hi
When I apply rotations to the body parts of my .ASE model - they all appear to rotate around
a point located below the feet of my model. - how can I stop this?
Cheers
Rmdire
Hi
When I apply rotations to the body parts of my .ASE model - they all appear to rotate around
a point located below the feet of my model. - how can I stop this?
Cheers
Rmdire
You don’t have to double post.
If you don’t get an answer that normally means, that nobody has one.
I don’t have any experience with rotating parts of ASE models, but I’ll try anyways:
rotX, rotY, rotZ create a rotation matrix, that rotates around (0,0,0) and it discards all translation data.
If you want to apply a rotation to a TransformGroup and want to keep your translation data, you can do:
transform.setRotation(Matrix3f);
Or you could first simply print the translation data ( transform.get(Vector3f) ), so you can see, if the pivot point data is stored there.
If it is not, there are two possibilities:
Arne
PS: If you have general problems with the javax.vecmath API I’d suggest to look into the Java3D Javadocs.
Hi Thanks for answering
and please for give my double post.
yep I tried what you said - i did
tempTrans.get(v);
for each body part and they contained (0,0,0)
so then I check the parent for each - and low and behold the parents contained the pivot points
I am a total novice so I am unsure what I need to do next
do I remove each of these parents?
Cheers
Rmdire
strange …
As far as i understood you the structure of the ASE-Object is build like this:
TransformGroup (contains translation to pivot point)
|
your child Node, you’re changing
so if you set a rotation in the child node it should rotate around the childs (0|0|0), so around the parents pivot-translation.
arrgh double post.
I’ve replied to your other post. Often I find a good way to solve problems is to go back to something that works (i.e. the demo), validate it works, then try with your customisations.
Will.
yes arne , thats what I would have thought,
but the Child always rotates around a point somwhere below the models feet, which is the center of origin for the whole model
Then you’ll probably change the wrong TransformGroup. You should not change the TransformGroup, that contains the pivot point translation…
Got it
Thanks arne and William
the parent node had another parent (Uber Parent) - eeeee gaaaad sakes*
when I rotated UperParent - it worked
Thanks for all your help
Ah, good one arne, I forgot how confusing that could be to new users.
There is a reason why I have two transforms and not one per node in the TGTree - it’s so you can rotate it easily without having to reapply the translation. I believe there is a flag that can tweak this behaviour. For new users it’s definitally worth studying the diagrams in my tutorial.
Will.