Camera

Módulo requerido

Componentes y propiedades

Nombre Descripción
Player.Main Camera Camera the player is using
Player.Custom Camera Get or set the camera entity that is currently rendering the scene on the player’s client. Note: The camera entity essentially represents the configuration data for controlling the client-side camera.
CameraType Multiple preset camera types available, as well as custom camera types
Camera Block Mode Motion mode of the camera when there is an obstruction between the camera and the object it is following
Camera Projection Mode Camera’s imaging style when rendering a screen
Camera Camera components
Camera Transition Type Camera Transition Type
Camera RayCast UI Client-side camera ray detection
Camera Viewing Angle Restriction Type Limits the range of camera rotation angles
Custom Camera A custom camera is fully controlled by the developer and determines what the player sees during gameplay

API

Nombre Descripción
Get Current Camera Get the camera entity currently used by the target player
Switch Camera Switching the target player’s camera to the target camera
Create Camera Create a camera
Set Camera Follow Set the position of the camera entity to always follow the target entity
Set Camera Focus Set the camera entity to always face the target entity
Screen Touch Ray Creates a ray from the current camera to the touch point on the screen
World To Screen Convert world coordinate to screen coordinate
Screen To World Convert screen coordinate to world coordinate
Screen Single Raycast Perform ray detection through screen touch and return the first entity hit
Screen Multi-Raycast Perform ray detection through screen touch and return all hit entities
Set Culling Mask Set the target camera layer mask
Get Culling Mask Get the target camera layer mask
Set Culling Mask Layer Set whether the specified layer is visible to the target camera.
Switch Custom Camera Switching the target player’s camera to the target camera
Switch Custom Camera Switching the target player’s camera to the target camera
Get Current Custom Camera Get the camera entity currently used by the target player
Get Current Custom Camera Get the camera entity currently used by the target player
Create Custom Camera Create a camera
Set Custom Camera Culling Mask Set the culling mask of the target camera to control visibility across all layers
Get Custom Camera Culling Mask Get the culling mask of the target camera
Set Custom Camera Culling Mask Layer Set the visibility of the target camera for a specific layer