View Full Version : Physics engine problem

01-12-2017, 12:19 AM

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.

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)
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?