diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynamics/rigid_body.rs | 8 | ||||
| -rw-r--r-- | src/geometry/collider.rs | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs index 9fa05a6..ee64f93 100644 --- a/src/dynamics/rigid_body.rs +++ b/src/dynamics/rigid_body.rs @@ -681,9 +681,7 @@ impl RigidBody { /// Sets the rotational part of this rigid-body's position. #[inline] - pub fn set_rotation(&mut self, rotation: AngVector<Real>, wake_up: bool) { - let rotation = Rotation::new(rotation); - + pub fn set_rotation(&mut self, rotation: Rotation<Real>, wake_up: bool) { if self.pos.position.rotation != rotation || self.pos.next_position.rotation != rotation { self.changes.insert(RigidBodyChanges::POSITION); self.pos.position.rotation = rotation; @@ -719,9 +717,9 @@ impl RigidBody { } /// If this rigid body is kinematic, sets its future translation after the next timestep integration. - pub fn set_next_kinematic_rotation(&mut self, rotation: AngVector<Real>) { + pub fn set_next_kinematic_rotation(&mut self, rotation: Rotation<Real>) { if self.is_kinematic() { - self.pos.next_position.rotation = Rotation::new(rotation); + self.pos.next_position.rotation = rotation; } } diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs index a9af8d1..efe6304 100644 --- a/src/geometry/collider.rs +++ b/src/geometry/collider.rs @@ -161,9 +161,9 @@ impl Collider { } /// Sets the rotational part of this collider's position. - pub fn set_rotation(&mut self, rotation: AngVector<Real>) { + pub fn set_rotation(&mut self, rotation: Rotation<Real>) { self.changes.insert(ColliderChanges::POSITION); - self.pos.0.rotation = Rotation::new(rotation); + self.pos.0.rotation = rotation; } /// Sets the position of this collider. |
