WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   scale problem using <node3d>.parent() (https://forum.worldviz.com/showthread.php?t=2986)

Chapre 09-26-2010 02:20 PM

scale problem using <node3d>.parent()
 
:confused:I have a problem with ".parent()"

let me illustrate:

[COLOR="rgb(46, 139, 87)"]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)[/COLOR]

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.
Code:

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



All times are GMT -7. The time now is 04:32 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC