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.