public struct CameraOcclusionPulls the shot in when something is standing between it and what it is looking at.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Cinemachine's Collider. The camera keeps its aim and gives up its distance: when the line from the target to the camera is blocked, the shot moves up that line to just in front of whatever blocked it, and eases back out when the way is clear again.
⚠ It needs something that can answer "is this line blocked", and Vixen.Engine has no such thing. The engine references no physics — that direction is deliberate and is what keeps Vixen.Physics an optional subsystem rather than a dependency of the frame loop. So the question is asked through ICameraOcclusion, which the host implements over whatever it has: a physics world, a navigation mesh, a hand-written box test in a game whose corridors are all boxes. A shot carrying this component in a game that supplies no implementation is not an error and does nothing.
Fields and properties (6)
public float RadiusThe radius of the probe, so the camera does not end up flush against a surface.
public float MinimumDistanceHow close to the target the camera may be pulled before it stops trying.
public float PullInDampingHow long the camera takes to remove 99 % of the pull inward.
public float PullOutDampingHow long the camera takes to ease back out once nothing is in the way.
public float AppliedHow far from the target the camera is currently allowed to be. Engine-owned.
public Vector3 PivotOffsetWhere the sweep starts, relative to the target's origin, in world space.
Methods (1)
public static CameraOcclusion Default(float radius = 0.2)An avoider that ducks in at once and comes back out over half a second.
Used by (7)
- ComponentRegistrationVixen.Engine
- PlayerCamerasVixen.Engine
- TypeRegistrationVixen.Engine
- VirtualCameraSystemVixen.Engine
- VirtualCameraTestsVixen.Engine.Tests
- Vixen_Engine_Cameras_CameraOcclusionSerializerVixen.Engine
- MaterialIconsVixen.Editor.App