pub struct Spatial(/* private fields */);Expand description
Control for updating the motion of a spatial signal
Implementations§
source§impl Spatial
impl Spatial
sourcepub fn set_motion(
&mut self,
position: Point3<f32>,
velocity: Vector3<f32>,
discontinuity: bool
)
pub fn set_motion( &mut self, position: Point3<f32>, velocity: Vector3<f32>, discontinuity: bool )
Update the position and velocity of the signal
Coordinates should be in world space, translated such that the listener is at the origin, but not rotated, with velocity relative to the listener. Units are meters and meters per second.
Set discontinuity when the signal or listener has teleported. This prevents inference of a
very high velocity, with associated intense Doppler effects.
If your sounds seem to be lagging behind their intended position by about half a second,
make sure you’re providing an accurate velocity!
Auto Trait Implementations§
impl !RefUnwindSafe for Spatial
impl Send for Spatial
impl Sync for Spatial
impl Unpin for Spatial
impl !UnwindSafe for Spatial
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