RenderCameraBaseBehaviour Class

Description

RenderCameraBaseBehaviour is the component to control render camera in AR scene.

Camera projectionMatrix including FOV are controlled by EasyAR.

Front Camera & Horizontal Flip

When you are using front camera on Android and iOS and CameraDeviceBaseBehaviour.HorizontalFlip is set to false or CameraDeviceBaseBehaviour.HorizontalFlip set to true in other conditions, EasyAR will turn on the horizontal flip mode.

When horizontal flip mode is on, the camera image will be horizontally flipped from the raw data when display, and

  1. GL.SetRevertBackfacing(true) will be called in OnPreRender

  2. GL.SetRevertBackfacing(false) will be called in OnPostRender (since 2.1.0)

But the camera data used for tracking will never be flipped.

The default behavior is made to be same with system camera. It makes you feel like looking into a mirror when you are using front camera. You can always change the default behavior by reversing CameraDeviceBaseBehaviour.HorizontalFlip.

Overwritten MonoBahaviour Functions

protected virtual void OnPreCull()
protected virtual void OnPreRender()
protected virtual void OnPostRender() (since 2.1.0)