How to understand the setPos

For a box, the code should be:

shape = BulletBoxShape(Vec3(0.5, 0.5, 0.5))
node = BulletRigidBodyNode('Box')
np = render.attachNewNode(node)
np.setPos(0, 0, 1)

The position is set to 0, 0, 1.

Which point has the 0, 0, 1 position?


For the eight points of box, which point has the 0, 0, 1 position? Is it d or the center of box?

It has nothing to do with the shape of the geometry. Here you can understand how NodePath works.

1 Like

Thanks ~~~

I believe BulletBoxShape is centered on the middle point. So in your situation, the (0, 0, 1) is in the center of the box.