WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   setParent with child of a 3dMax model (https://forum.worldviz.com/showthread.php?t=4101)

Andy 01-09-2012 08:10 AM

setParent with child of a 3dMax model
 
1 Attachment(s)
I have a 3dmax model with some subnodes and I want to set another node as a child of one of this subnodes.

I have a simple example file, why is the ball place in the center of the model and not in the center of the subnode? In Vizard 3 it works correctly. Any idea?

Code:

import viz
viz.go()

viz.clearcolor(viz.SKYBLUE)
viz.addChild('tut_ground.wrl')
viz.MainView.setPosition([0,1.8,-14])

ball = viz.add('ball.wrl')
ball.setScale(3,3,3)
node = viz.add('testChilddNode_4.IVE')

subNode1 = node.getChild('Quader02-GEODE')
subNode2 = node.getChild('Quader03-GEODE')

ball.parent(subNode2)

node.setPosition([0,3,0])


farshizzo 01-09-2012 05:28 PM

I ran your script and I get the same results with Vizard 3 and 4. The ball is centered around the small box at the top. Where are you expecting the ball to be positioned?

Andy 01-10-2012 01:13 AM

Hi
I have found the problem. I have a global config 'vozcore.cfg' an set 'viz.model.optimize = 1 '. If I do this, the ball is center around the big box at the bottom, if I set it to 0 it works like it should.
thanks


All times are GMT -7. The time now is 02:33 PM.

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