Camera
In order to view a scene, you need a camera. The Camera
component enables an Entity to render a scene. You can use the entity’s position and rotation to control the camera.
Usage
A Camera
is a component, so you attach it to an Entity
and the camera will render the scene from the entity’s position and rotation.
import { Camera } from '@playcanvas/react/components'
<Entity>
<Camera fov={28} clearColor="rebeccapurple" />
</Entity>
Learn more about the Camera Component in the PlayCanvas documentation.
Props
The following props are based on PlayCanvas version 2.3.3. This documentation is automatically generated from the TypeScript types of the installed PlayCanvas package.
Last updated on