bevy_rapier icon indicating copy to clipboard operation
bevy_rapier copied to clipboard

Added `locked_axes()` and `set_locked_axes()` methods for (some) joints

Open Aztro-dev opened this issue 2 years ago • 0 comments

Implemented locked_axes(&self) for all of these structs:

  • FixedJoint
  • PrismaticJoint
  • RevoluteJoint
  • RopeJoint
  • SphericalJoint

locked_axes(&self) returns all of the axes that are currently locked by the joint.

Implemented set_locked_axes(&mut self, axes: JointAxesMask) for all of these structs:

  • PrismaticJoint
  • RevoluteJoint
  • RopeJoint
  • SphericalJoint

set_locked_axes(&mut self, axes: JointAxesMask) allows you to lock axes that aren't already locked by the default axes.

implemented lock_axes(&mut self, axes: JointAxesMask) for all of these structs:

  • PrismaticJointBuilder
  • RevoluteJointBuilder
  • RopeJointBuilder
  • SphericalJointBuilder

lock_axes(&mut self, axes: JointAxesMask) works exactly the same as set_locked_axes(), but is only implemented for Joint builders.

Made JointAxesMask and JointAxis publicly available, rather than having to import them through rapier.

Aztro-dev avatar Aug 08 '23 02:08 Aztro-dev