WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 11-21-2011, 03:41 AM
Andy Andy is offline
Join Date: Mar 2008
Location: Germany
Posts: 36
hierarchical models / physic shapes problem in Viz4

Hi, I would like to build a hierarchical model with some 3d model files. This construct should be part of the physic engine. Each node should have his own collide shape.

import viz
import vizact

ground = viz.add('tut_ground.wrl')  # Add ground
ground.collidePlane()   # Make collideable plane
box = viz.add('box.wrl', pos = [2,2, 0], scale=[0.2, 0.2, 0.2])

MainNode = viz.add("tut_cone.wrl")

subNode1 = viz.add("tut_cone.wrl",pos = [0, 0.5, 0])

subNode2 = viz.add("tut_cone.wrl",pos = [0, 1.0, 0])

vizact.onkeydown('1', viz.phys.enable)   # Enable physics
If I set a new position I see the hierarchical model is ok, but if I put the physic engine on only the ďMainNodeĒ take part on the physic-simulation. Thatís a problem of Vizard4, in Vizard3 this script works like it should!

Has anyone an idea or a solution?
Reply With Quote
Old 11-21-2011, 06:06 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,471
For nodes to react correctly in the physics simulation they should be children of the world. This is the case for both Vizard 3 and Vizard 4 and you'll see a strange result if you enable viz.PHYSICS for the subNodes. If you remove the subNodes' collide shapes they will fall with the mainNode just as they do with the current script when run in Vizard 3.
Reply With Quote
Old 11-22-2011, 12:56 AM
Andy Andy is offline
Join Date: Mar 2008
Location: Germany
Posts: 36
Thanks for your answer; I only wonder why in Vizard3 the hierarchical model still works. In my original script I only enable viz.COLLIDE_NOTIFY but I donít know if it works correctly. I will use joints for my script; I think thatís a better solution for this problem.
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with importing Quake2/md2 models johanzebin Vizard 3 09-05-2013 01:02 AM
The problem of adding two .ive models Vizard 1 08-08-2011 12:04 AM

All times are GMT -7. The time now is 11:15 AM.

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