[osg-users] Problem with local coordinate!
GTOMLINSON at overwatch.textron.com
Wed Sep 17 06:04:47 PDT 2008
You have to work out what their current centers are, say the instance center is 10,10,10 then then add a static transform to move these to the origin, -10,-10,-10, then if to want to move these instances around you could simply flatten the object so the transform is applied to the verts etc or add a dynamic transform above the static transfom among other options
Product Manager 3D
Email : gtomlinson @ overwatch.textron.com
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651
"Self defence is not a function of learning tricks
but is a function of how quickly and intensely one
can arouse one's instinct for survival"
- Master Tambo Tetsura
From: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Tuan Do
Sent: Wednesday, September 17, 2008 7:51 AM
To: osg-users at lists.openscenegraph.org
Subject: [osg-users] Problem with local coordinate!
just a simple question, and I can't find related topics on the group.
How can I get/set my components' local center coordinate? I have lots of components, all of them are contained in one 3DS model and have it's own local coordinate.
I used matrixtransform to set a component's position to (0,0,0) but it didn't translate to the origin, and all components' position is like in the model. Then I used matrixTransform to rotate a component around it's local axis, it still worked but it's position (gettrans()) always change.
I really don't understand this, I don't want to seperate the model to many components. Any support'd be appreciated.
Thanks, Best Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users