WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Physics engine problem (https://forum.worldviz.com/showthread.php?t=5937)

zytcll 01-11-2017 11:19 PM

Physics engine problem
 
Hi,

I have a long bar with nodes from [node00] to [node10] side by side, and its center is as same as [node05].

Now I want to let parts of nodes visible and fall down, so I set collideBox to only these nodes, and set other nodes with collideNone.

When center node [node05] is included in collision nodes, it works normally. However, when center node is node included, it starts rotating after landing.

Code:


bar.setPosition([0, 4, 0] )
       
for i in range(11):
        nodeName = "bar"
        if k < 10:
                nodeName  += str(0)
        nodeName  += str(k)
                       
        if (k > 6) and (k < 9):
                bar.visible(viz.ON, node = nodeName  )
                bar.collideBox(node = nodeName)
        else:
                bar.visible(viz.OFF, node = nodeName)

I think I should reset the center of the bar, but it still works badly after I use setCenter(pos), so is there any way to solve this problem?


All times are GMT -7. The time now is 01:36 PM.

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