Noob's question

I apologize if the question has been already asked, but whether there is a way to restrict movement of bulletrigidbodynode on Z axis.

To constrain movement/translation of a Bullet rigid body, you can set its linear_factor. To constrain rotation use angular_factor.

For example, to have no movement on the Z-axis, you can use:

body.linear_factor = panda3d.core.LVector3(1, 1, 0)

# this would likely work too (untested)
body.linear_factor = (1, 1, 0)

To only move long the Z-axis, you can use (0, 0, 1) instead.

1 Like

Thanks for fast reply,I’ll try this tomorrow!