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
 
 
 

Gordon

__________________________________________________________
Gordon Tomlinson

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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tuan Do
Sent: Wednesday, September 17, 2008 7:51 AM
To: [email protected]
Subject: [osg-users] Problem with local coordinate!


Hi all,
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.

-- 
ЯicKy

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to