PDA

View Full Version : scale problem using <node3d>.parent()


Chapre
09-26-2010, 02:20 PM
:confused:I have a problem with "<node3d>.parent()"

let me illustrate:

chair=viz.add("chair.osg",scale=(0.1,0.1,0.1))
van=viz.add("van.osg",scale=(0.1,0.1,0.1))
chair.parent(van)

After I run the script, "chair" becomes child of "van", the only problem is that "chair" is again scaled and it become very small, please how could make chair child of van and keep the scale it had when it was still child of "viz"

farshizzo
09-27-2010, 11:23 AM
Just don't apply the scale factor to the chair object, and let it inherit the scale from the parent.van=viz.add("van.osg",scale=(0.1,0.1,0.1))
chair=viz.add("chair.osg",parent=van)