public sealed class CameraImpulsesThe impulses in flight: what emits one writes here, and every listening shot reads from here.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The same shape as DebugDraw: an accumulator that anything may write to and one system drains, so a grenade can shake the camera without Vixen.Physics knowing what a camera is. VirtualCameraSystem is what ages it, once a frame, before it samples — so an impulse emitted during Update is felt on the frame it was emitted in.
Removal is a swap with the last element, which reorders the list. That is allowed here and nowhere near the coroutine scheduler, because contributions are summed: addition commutes, so the order the impulses are visited in cannot change the answer by more than the last bit of a float.
Fields and properties (1)
public int CountHow many impulses are still ringing.
Methods (4)
public void Emit(in CameraImpulse impulse)Emits an impulse. It is felt from this frame until its duration is up.
public void Advance(float deltaTime)Ages every impulse and drops the ones that have finished.
public void Clear()Forgets every impulse. For a scene change, where none of them should carry over.
public Vector3 Sample(Vector3 listener)The displacement everything in flight adds up to, at a place.
Used by (2)
- VirtualCameraSystemVixen.Engine
- VirtualCameraTestsVixen.Engine.Tests