pub struct LookAt {
pub smoothness: f32,
pub target: Point3<f32>,
/* private fields */
}Expand description
Rotates the camera to point at a world-space position.
The target tracking can be additionally smoothed, and made to look ahead of it.
Fields§
§smoothness: f32Exponential smoothing factor
target: Point3<f32>The world-space position to look at
Implementations§
Source§impl LookAt
impl LookAt
pub fn new<P>(target: P) -> Self
Sourcepub fn tracking_smoothness(self, smoothness: f32) -> Self
pub fn tracking_smoothness(self, smoothness: f32) -> Self
Set the exponential smoothing factor for target position tracking.
Sourcepub fn tracking_predictive(self, predictive: bool) -> Self
pub fn tracking_predictive(self, predictive: bool) -> Self
Reverse target position smoothing, causing the camera to look ahead of it.
This can then be chained with Smooth, to create
a camera that smoothly follows an object, but doesn’t lag far behind it.
Trait Implementations§
Source§impl<H: Handedness> RigDriver<H> for LookAt
impl<H: Handedness> RigDriver<H> for LookAt
Source§fn update(&mut self, params: RigUpdateParams<'_, H>) -> Transform<H>
fn update(&mut self, params: RigUpdateParams<'_, H>) -> Transform<H>
Calculates the transform of this driver component based on the parent
provided in
params.Auto Trait Implementations§
impl Freeze for LookAt
impl RefUnwindSafe for LookAt
impl Send for LookAt
impl Sync for LookAt
impl Unpin for LookAt
impl UnwindSafe for LookAt
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
Mutably borrows from an owned value. Read more