pub struct MotorJointDef { /* private fields */ }Expand description
Definition for a motor joint.
Implementations§
Source§impl MotorJointDef
impl MotorJointDef
Sourcepub fn linear_velocity(self, velocity: impl Into<Vec3>) -> Self
pub fn linear_velocity(self, velocity: impl Into<Vec3>) -> Self
Sets the target linear velocity in world length units per second.
Sourcepub fn angular_velocity(self, velocity: impl Into<Vec3>) -> Self
pub fn angular_velocity(self, velocity: impl Into<Vec3>) -> Self
Sets the target angular velocity in radians per second around each axis.
Sourcepub fn max_velocity_force(self, force: f32) -> Self
pub fn max_velocity_force(self, force: f32) -> Self
Sets the maximum velocity-control force, typically in newtons.
Sourcepub fn max_velocity_torque(self, torque: f32) -> Self
pub fn max_velocity_torque(self, torque: f32) -> Self
Sets the maximum velocity-control torque, typically in newton-meters.
Sourcepub fn linear_spring(
self,
hertz: f32,
damping_ratio: f32,
max_force: f32,
) -> Self
pub fn linear_spring( self, hertz: f32, damping_ratio: f32, max_force: f32, ) -> Self
Sets linear spring frequency in hertz, dimensionless damping, and maximum force, typically in newtons.
Sourcepub fn angular_spring(
self,
hertz: f32,
damping_ratio: f32,
max_torque: f32,
) -> Self
pub fn angular_spring( self, hertz: f32, damping_ratio: f32, max_torque: f32, ) -> Self
Sets angular spring frequency in hertz, dimensionless damping, and maximum torque, typically in newton-meters.
Source§impl MotorJointDef
impl MotorJointDef
Sourcepub fn body_ids(self, body_a: BodyId, body_b: BodyId) -> Self
pub fn body_ids(self, body_a: BodyId, body_b: BodyId) -> Self
Replaces the two bodies connected by the joint.
Sourcepub fn local_frame_a(self, frame: Transform) -> Self
pub fn local_frame_a(self, frame: Transform) -> Self
Sets the local constraint frame on body A.
Sourcepub fn local_frame_b(self, frame: Transform) -> Self
pub fn local_frame_b(self, frame: Transform) -> Self
Sets the local constraint frame on body B.
Sourcepub fn collide_connected(self, enabled: bool) -> Self
pub fn collide_connected(self, enabled: bool) -> Self
Controls whether the connected bodies may collide.
Sourcepub fn force_threshold(self, threshold: f32) -> Self
pub fn force_threshold(self, threshold: f32) -> Self
Sets the force threshold used to emit joint events, typically in newtons.
Sourcepub fn torque_threshold(self, threshold: f32) -> Self
pub fn torque_threshold(self, threshold: f32) -> Self
Sets the torque threshold used to emit joint events, typically in newton-meters.
Sourcepub fn constraint_tuning(self, tuning: JointTuning) -> Self
pub fn constraint_tuning(self, tuning: JointTuning) -> Self
Sets common constraint frequency in hertz and its dimensionless damping ratio.
Sourcepub fn draw_scale(self, draw_scale: f32) -> Self
pub fn draw_scale(self, draw_scale: f32) -> Self
Overrides the length-unit-derived native debug draw scale.
Trait Implementations§
Source§impl Clone for MotorJointDef
impl Clone for MotorJointDef
Source§fn clone(&self) -> MotorJointDef
fn clone(&self) -> MotorJointDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more