pub struct FollowController {
pub target: Option<SkinnedMeshHandle>,
pub distance: f32,
pub height: f32,
pub drive: FollowDrive,
pub turn_speed: f32,
pub speed_parameter: String,
pub jump_height: f32,
}Expand description
Third-person follow settings carried on a CameraController.
When follow is set the camera becomes a third-person orbit camera: the
mouse orbits around the followed character, and WASD steers the character
itself (camera-relative). The character must be a
SkinnedMesh with a capsule, so it has a kinematic
character capsule to move.
Fields§
§target: Option<SkinnedMeshHandle>Name of the followed SkinnedMesh. It must declare a
capsule.
distance: f32Orbit distance from the pivot to the camera, in world units.
height: f32Pivot height above the character’s feet, in world units.
drive: FollowDriveHow the character moves; see FollowDrive.
turn_speed: f32Character turn rate toward the input heading, in radians per second.
speed_parameter: StringName of the character’s AnimationGraph float parameter that receives the current travel speed in world units per second (drives a locomotion blendspace). Empty disables parameter writes, leaving the graph externally driven.
jump_height: f32Jump apex height in world units when the jump key is pressed while
grounded. 0 disables jumping.
Trait Implementations§
Source§impl Clone for FollowController
impl Clone for FollowController
Source§fn clone(&self) -> FollowController
fn clone(&self) -> FollowController
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FollowController
impl Debug for FollowController
Source§impl Default for FollowController
impl Default for FollowController
Source§fn default() -> FollowController
fn default() -> FollowController
Source§impl<'de> Deserialize<'de> for FollowControllerwhere
FollowController: Default,
impl<'de> Deserialize<'de> for FollowControllerwhere
FollowController: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FollowController, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FollowController, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for FollowController
impl Serialize for FollowController
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for FollowController
impl RefUnwindSafe for FollowController
impl Send for FollowController
impl Sync for FollowController
impl Unpin for FollowController
impl UnsafeUnpin for FollowController
impl UnwindSafe for FollowController
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().