aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/joint/revolute_joint.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-02-22 12:12:24 +0100
committerCrozet Sébastien <developer@crozet.re>2021-02-22 12:12:24 +0100
commitaaba6c8927b0cdd0de7739b37f2bdfe267074dbb (patch)
tree1bf526e70602aaabaa1fc294b0cfef0381a50f57 /src/dynamics/joint/revolute_joint.rs
parentf204a5f7361fea92ff0f795246a667afb738d56d (diff)
downloadrapier-aaba6c8927b0cdd0de7739b37f2bdfe267074dbb.tar.gz
rapier-aaba6c8927b0cdd0de7739b37f2bdfe267074dbb.tar.bz2
rapier-aaba6c8927b0cdd0de7739b37f2bdfe267074dbb.zip
Add motors to prismatic joints.
Diffstat (limited to 'src/dynamics/joint/revolute_joint.rs')
-rw-r--r--src/dynamics/joint/revolute_joint.rs2
1 files changed, 2 insertions, 0 deletions
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<Real>,
+
/// 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.