From aaba6c8927b0cdd0de7739b37f2bdfe267074dbb Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Mon, 22 Feb 2021 12:12:24 +0100 Subject: Add motors to prismatic joints. --- src/dynamics/joint/revolute_joint.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/dynamics/joint/revolute_joint.rs') diff --git a/src/dynamics/joint/revolute_joint.rs b/src/dynamics/joint/revolute_joint.rs index e1e1441..6895d3d 100644 --- a/src/dynamics/joint/revolute_joint.rs +++ b/src/dynamics/joint/revolute_joint.rs @@ -23,6 +23,7 @@ pub struct RevoluteJoint { /// /// The impulse applied to the second body is given by `-impulse`. pub impulse: Vector5, + /// The target relative angular velocity the motor will attempt to reach. pub motor_target_vel: Real, /// The target relative angle along the joint axis the motor will attempt to reach. @@ -39,6 +40,7 @@ pub struct RevoluteJoint { pub motor_impulse: Real, /// The spring-like model used by the motor to reach the target velocity and . pub motor_model: SpringModel, + // Used to handle cases where the position target ends up being more than pi radians away. pub(crate) motor_last_angle: Real, // The angular impulse expressed in world-space. -- cgit