pub struct CameraProbe {
pub target: SkinnedMeshHandle,
pub pivot: [f32; 3],
pub desired: [f32; 3],
pub clearance: Option<f32>,
}Expand description
Runtime-only occlusion probe for the third-person follow camera.
The third-person controller publishes one and refreshes pivot /
desired (the orbit pivot and the unclamped camera position) every
frame; PhysicsSystem (which steps earlier) raycasts from the pivot
toward the previous frame’s desired position and writes back the largest
unobstructed clearance, excluding the followed character’s own capsule.
The controller then pulls the camera inside that distance so walls do not
cut between camera and character.
Not authored in world files: it has no args.
Fields§
§target: SkinnedMeshHandleThe followed SkinnedMesh, whose rig capsule the ray must ignore.
pivot: [f32; 3]Orbit pivot in world space (the ray origin).
desired: [f32; 3]Unclamped camera position the controller wants this frame.
clearance: Option<f32>Largest unobstructed distance from pivot toward desired, or
None when the path is clear (or unanswered).
Trait Implementations§
Source§impl Clone for CameraProbe
impl Clone for CameraProbe
Source§fn clone(&self) -> CameraProbe
fn clone(&self) -> CameraProbe
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Component for CameraProbe
impl Component for CameraProbe
Source§const NAME: &'static str = "CameraProbe"
const NAME: &'static str = "CameraProbe"
Source§fn from_baked(_bytes: &[u8]) -> Result<Self, CnResult>
fn from_baked(_bytes: &[u8]) -> Result<Self, CnResult>
Source§fn inject_locator(&mut self, _locator: PayloadLocator)
fn inject_locator(&mut self, _locator: PayloadLocator)
Source§fn inject_name(&mut self, _id: AssetId)
fn inject_name(&mut self, _id: AssetId)
Source§impl ComponentSlot for CameraProbe
impl ComponentSlot for CameraProbe
Source§const DISCRIMINANT: u8
const DISCRIMINANT: u8
ComponentId.Source§fn slot(s: &ComponentStorage) -> &Column<CameraProbe>
fn slot(s: &ComponentStorage) -> &Column<CameraProbe>
Source§fn slot_mut(s: &mut ComponentStorage) -> &mut Column<CameraProbe>
fn slot_mut(s: &mut ComponentStorage) -> &mut Column<CameraProbe>
Source§impl Debug for CameraProbe
impl Debug for CameraProbe
Source§impl Default for CameraProbe
impl Default for CameraProbe
Source§fn default() -> CameraProbe
fn default() -> CameraProbe
Source§impl From<CameraProbe> for ComponentAsset
impl From<CameraProbe> for ComponentAsset
Source§fn from(c: CameraProbe) -> ComponentAsset
fn from(c: CameraProbe) -> ComponentAsset
impl RuntimeComponent for CameraProbe
Auto Trait Implementations§
impl Freeze for CameraProbe
impl RefUnwindSafe for CameraProbe
impl Send for CameraProbe
impl Sync for CameraProbe
impl Unpin for CameraProbe
impl UnsafeUnpin for CameraProbe
impl UnwindSafe for CameraProbe
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<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().