YaCameraAPI¶
YaCameraAPI
adjusts the player's camera. Before you apply this API, make sure you attach any of the following community components to objects in the scene.- Setting_CameraFixPositionAndOrientation
- Setting_CameraFixPositionAndViewControllable
- Setting_CameraFixPositionAndLookAt
- Setting_CameraTopdown. With this component, the SetCameraPosition and SetCameraOrientation functions are unavailable.
- Setting_CameraRTS
- Setting_CameraSideScroll. With this component, the SetCameraPosition and SetCameraOrientation functions are unavailable.
- Setting_CameraThirdPerson. With this component, the SetCameraPosition function is unavailable.
Functions¶
void YaCameraAPI.SetCameraOrientation(YaEntity targetPlayer, float3 orientation)¶
DEPRECATED
Sets the camera rotation in Euler angles in degrees. Cannot be set with the FixedPositionAndLookAt component.
targetPlayer
The target playerorientation
The direction that the player faces
void YaCameraAPI.SetCameraOrientation(YaEntity targetPlayer, float3 orientation, YaCameraOrientationFlags cameraOrientationFlags)¶
DEPRECATED
Sets the camera rotation in Euler angles in degrees. Cannot be set with the FixedPositionAndLookAt component.
targetPlayer
The player entity or avatar entity that player is controllingorientation
The direction that the camera facescameraOrientationFlags
Which axis will be considered in this call.Ignored axis value will use camera's relevant original value.
void YaCameraAPI.SetCameraPosition(YaEntity targetPlayer, float3 position)¶
DEPRECATED
Sets the camera position. Cannot be set with the ThirdPerson, SideScroll, or TopDown component.
targetPlayer
The player entity or avatar entity that player is controllingposition
The position where camera should locates at
void YaCameraAPI.SetCameraDistance(YaEntity targetPlayer, number distance)¶
DEPRECATED
Sets the amount of extra distance between camera and target. Cannot be set with the FixPositionAndOrientation, FixPositionAndLookAt, FixPositionAndViewControllable component.
targetPlayer
The player entity or avatar entity that player is controllingdistance
The distance
void YaCameraAPI.SetCameraFollowAt(YaEntity targetPlayer, YaEntity followTarget)¶
DEPRECATED
Sets the target for the camera to follow.
targetPlayer
The player entity or avatar entity that player is controllingfollowTarget
The target that camera follows
void YaCameraAPI.SetCameraLookAt(YaEntity targetPlayer, YaEntity lookAtTarget)¶
DEPRECATED
Sets the target for the camera to look at.
targetPlayer
The player entity or avatar entity that player is controllinglookAtTarget
The target that camera looks at
void YaCameraAPI.SetCameraControllable(YaEntity targetPlayer, boolean controllable)¶
DEPRECATED
Determines if the camera view is controllable.
targetPlayer
The player entity or avatar entity that player is controllingcontrollable
If true, the camera view and zoom in is controllable; if false, the camera view and zoom in is uncontrollable.
void YaCameraAPI.SetCameraFov(YaEntity targetPlayer, number fov)¶
DEPRECATED
Clamps the camera's field of view (FOV) value between 1 and 179.
targetPlayer
The player entity or avatar entity that player is controllingfov
The field of view of the camera
void YaCameraAPI.SetCameraSensitivity(YaEntity targetPlayer, number sensitivity)¶
DEPRECATED
If the camera view is controllable, use this API to adjust the speed of the camera.
targetPlayer
The player entity or avatar entity that player is controllingsensitivity
The speed of the camera movement
void YaCameraAPI.SetCameraNearFarClippingPlane(YaEntity targetPlayer, float2 nearFarClippingPlane)¶
DEPRECATED
Adjusts the near and far plane of the camera's viewing frustum.
targetPlayer
The player entity or avatar entity that player is controllingnearFarClippingPlane
The near and far clipping plane of the camera's viewing frustum. Recommended near clipping plane value: 0.2. The far clipping plane should not be too close to the camera as any objects further away from the camera than the far clipping plane isn't displayed.
void YaCameraAPI.SetCameraRestore(YaEntity targetPlayer)¶
DEPRECATED
Restores initial camera settings.
targetPlayer
The player entity or avatar entity that player is controlling
YaPostProcessBloomHandle YaCameraAPI.InstanceBloomHandle(YaEntity targetPlayer)¶
ReturnsPost process bloom handle
Camera play post process bloom on target player
targetPlayer
player entity or avatar entity
1 2 3 4 5 |
|
YaPostProcessBloomHandle YaCameraAPI.InstanceBloomHandleGlobal()¶
ReturnsPost process bloom handle
Camera play post process bloom on all entities
1 2 3 4 5 |
|
YaPostProcessColorAdjustHandle YaCameraAPI.InstanceColorAdjustHandle(YaEntity targetPlayer)¶
ReturnsPost process color adjust handle
Camera play post process color adjust on target player
targetPlayer
player entity or avatar entity
1 2 3 4 5 6 |
|
YaPostProcessColorAdjustHandle YaCameraAPI.InstanceColorAdjustHandleGlobal()¶
ReturnsPost process color adjust handle
Camera play post process color adjust on all entities
1 2 3 4 5 6 |
|
YaPostProcessVignetteHandle YaCameraAPI.InstanceVignetteHandle(YaEntity targetPlayer)¶
ReturnsPost process color adjust handle
Camera play post process vignette on target player
targetPlayer
player entity or avatar entity
1 2 3 4 |
|
YaPostProcessVignetteHandle YaCameraAPI.InstanceVignetteHandleGlobal()¶
ReturnsPost process color adjust handle
Camera play post process vignette on all entities
1 2 3 4 |
|