diff --git a/nidhogg/src/types/joint_array.rs b/nidhogg/src/types/joint_array.rs index 1826f70..c9624d0 100644 --- a/nidhogg/src/types/joint_array.rs +++ b/nidhogg/src/types/joint_array.rs @@ -358,7 +358,7 @@ impl FillExt for JointArray { impl JointArrayBuilder { /// Set all the joint values to the corresponding values from the provided [`JointArray`]. - pub fn joints(mut self, joints: JointArray) { + pub fn joints(mut self, joints: JointArray) -> Self { self.head_pitch = Some(joints.head_pitch); self.head_yaw = Some(joints.head_yaw); @@ -388,6 +388,8 @@ impl JointArrayBuilder { self.right_elbow_roll = Some(joints.right_elbow_roll); self.right_wrist_yaw = Some(joints.right_wrist_yaw); self.right_hand = Some(joints.right_hand); + + self } /// Set the `head_pitch` and `head_yaw` values to the corresponding values from the provided [`HeadJoints`].