pub struct TeleportOptions {
pub velocity: VelocityPolicy,
pub clear_forces: bool,
pub clear_kinematic_targets: bool,
}Expand description
Independent motion-reset choices for a checked teleport. Construction requires an explicit velocity policy. Fields may be edited to retain forces or pending targets; see the dimensional teleport methods.
Fields§
§velocity: VelocityPolicy§clear_forces: boolClear both accumulated force and torque. Gravity/damping are unchanged.
clear_kinematic_targets: boolClear both next-position and next-rotation kinematic targets.
Implementations§
Source§impl TeleportOptions
impl TeleportOptions
Sourcepub const fn new(velocity: VelocityPolicy) -> TeleportOptions
pub const fn new(velocity: VelocityPolicy) -> TeleportOptions
Select a velocity policy and clear forces/torque and kinematic targets.
To retain either independently, set the corresponding field to false.
See d2::RigidBody::try_teleport for a runnable reset recipe.
Trait Implementations§
Source§impl Clone for TeleportOptions
impl Clone for TeleportOptions
Source§fn clone(&self) -> TeleportOptions
fn clone(&self) -> TeleportOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TeleportOptions
impl Debug for TeleportOptions
Source§impl PartialEq for TeleportOptions
impl PartialEq for TeleportOptions
impl Copy for TeleportOptions
impl Eq for TeleportOptions
impl StructuralPartialEq for TeleportOptions
Auto Trait Implementations§
impl Freeze for TeleportOptions
impl RefUnwindSafe for TeleportOptions
impl Send for TeleportOptions
impl Sync for TeleportOptions
impl Unpin for TeleportOptions
impl UnwindSafe for TeleportOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more