• Godot Help3D
  • Lock/unlock the angular Y lock on a 3d Rigidbody?

I could well be wrong but the documentation looks incomplete (but it could just as much be I can't understand it..yet) - I'm trying to set the angular Y lock on a 3d Rigidbody

The documentation says

bool axis_lock_angular_y [default: false]
set_axis_lock(value) setter
get_axis_lock() getter

Lock the body's rotation in the Y axis.

but the info looks too similar for the x and z axis also. What code should I use to lock and unlock the angular Y lock at will? Thanks!

  • For this one, you can just assign the value to the bool.
    rigidbody.axis_lock_angular_y=true

For this one, you can just assign the value to the bool.
rigidbody.axis_lock_angular_y=true