Enum hltas::types::VectorialStrafingConstraints
source · pub enum VectorialStrafingConstraints {
VelocityYaw {
tolerance: f32,
},
AvgVelocityYaw {
tolerance: f32,
},
VelocityYawLocking {
tolerance: f32,
},
Yaw {
yaw: f32,
tolerance: f32,
},
YawRange {
from: f32,
to: f32,
},
LookAt {
entity: Option<NonZeroU32>,
x: f32,
y: f32,
z: f32,
},
}
Expand description
Constraints for the vectorial strafing algorithm.
Variants§
VelocityYaw
Constrains the player yaw relative the velocity yaw.
AvgVelocityYaw
Constrains the player yaw relative the yaw of velocity averaged over last two frames.
Fields
VelocityYawLocking
Constrains the player yaw to the velocity yaw, locking to the target strafing yaw.
When the velocity yaw rotates past the target strafing yaw (usually the frame bulk yaw), the constraint locks the player yaw to the target strafing yaw. When the target strafing yaw changes, the yaw is unlocked and follows the velocity yaw until the next time it reaches the target strafing yaw, and so on.
Fields
Yaw
Constrains the player yaw relative to the given yaw.
Fields
YawRange
Constrains the player yaw to the given range.
The range is in degrees, mod 360, inclusive from both sides. The order matters: from 10 to 350 results in a wide angle range, and from 350 to 10 results in a narrow angle range opposite to the first one.
Fields
LookAt
Constrains the player yaw to look at the given point.
Trait Implementations§
source§impl Clone for VectorialStrafingConstraints
impl Clone for VectorialStrafingConstraints
source§fn clone(&self) -> VectorialStrafingConstraints
fn clone(&self) -> VectorialStrafingConstraints
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for VectorialStrafingConstraints
impl Debug for VectorialStrafingConstraints
source§impl PartialEq for VectorialStrafingConstraints
impl PartialEq for VectorialStrafingConstraints
source§fn eq(&self, other: &VectorialStrafingConstraints) -> bool
fn eq(&self, other: &VectorialStrafingConstraints) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for VectorialStrafingConstraints
impl StructuralPartialEq for VectorialStrafingConstraints
Auto Trait Implementations§
impl Freeze for VectorialStrafingConstraints
impl RefUnwindSafe for VectorialStrafingConstraints
impl Send for VectorialStrafingConstraints
impl Sync for VectorialStrafingConstraints
impl Unpin for VectorialStrafingConstraints
impl UnwindSafe for VectorialStrafingConstraints
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)