[][src]Enum hltas::types::VectorialStrafingConstraints

pub enum VectorialStrafingConstraints {
    VelocityYaw {
        tolerance: f32,
    },
    AvgVelocityYaw {
        tolerance: f32,
    },
    VelocityYawLocking {
        tolerance: f32,
    },
    Yaw {
        yaw: f32,
        tolerance: f32,
    },
    YawRange {
        from: f32,
        to: f32,
    },
}

Constraints for the vectorial strafing algorithm.

Variants

VelocityYaw

Constrains the player yaw relative the velocity yaw.

Fields of VelocityYaw

tolerance: f32

The player's yaw should remain within velocity yaw ± tolerance degrees.

AvgVelocityYaw

Constrains the player yaw relative the yaw of velocity averaged over last two frames.

Fields of AvgVelocityYaw

tolerance: f32

The player's yaw should remain within average velocity yaw ± tolerance degrees.

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 of VelocityYawLocking

tolerance: f32

The player's yaw should remain within velocity yaw or target strafing yaw ± tolerance degrees.

Yaw

Constrains the player yaw relative to the given yaw.

Fields of Yaw

yaw: f32

The target yaw in degrees.

tolerance: f32

The player's yaw should remain within yaw ± tolerance degrees.

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 of YawRange

from: f32

The lowest yaw angle of the range in degrees.

to: f32

The highest yaw angle of the range in degrees.

Trait Implementations

impl Clone for VectorialStrafingConstraints[src]

impl Copy for VectorialStrafingConstraints[src]

impl Debug for VectorialStrafingConstraints[src]

impl PartialEq<VectorialStrafingConstraints> for VectorialStrafingConstraints[src]

impl StructuralPartialEq for VectorialStrafingConstraints[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.