ZepetoCamera
ZEPETO.Character.Controller.ZepetoCamera
Camera control class designed for use within a ZEPETO Character Controller.
Hierarchy
↳
ZepetoCamera
Constructors
constructor
• new ZepetoCamera()
Inherited from
UnityEngine.MonoBehaviour.constructor
Properties
OnChangedState
• OnChangedState: UnityEvent$2
<CameraState
, CameraState
>
Event triggered when the camera state changes. Registered listeners receive two parameters:
- The new camera state. (Type:
CameraState
) - The previous camera state. (Type:
CameraState
)
OnUpdateState
• OnUpdateState: UnityEvent$1
<CameraState
>
Event triggered when the current camera state is in the status of StateStatus.Update
.
Registered listeners receive a single parameter:
- The current camera state. (Type:
CameraState
)
additionalMaxZoomDistance
• additionalMaxZoomDistance: number
Extra distance added to the default maximum zoom value.
additionalMinZoomDistance
• additionalMinZoomDistance: number
Extra distance added to the default minimum zoom value.
additionalOffset
• additionalOffset: Vector3
Additional offset applied to the camera's position relative to its target.
Accessors
CollisionLayer
• get
CollisionLayer(): LayerMask
Defines the layers with which the camera can collide.
Returns
• set
CollisionLayer(value
): void
Defines the layers with which the camera can collide.
Parameters
Name | Type |
---|---|
value | LayerMask |
Returns
void
FollowTarget
• get
FollowTarget(): Transform
Retrieves the Transform
of the target.
By default, this is set to be the HEAD_UPPER
of the local player's character.
Returns
LockXAxis
• get
LockXAxis(): boolean
Indicates whether the camera's X-axis rotation is locked.
Returns
boolean
• set
LockXAxis(value
): void
Indicates whether the camera's X-axis rotation is locked.
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
LookOffset
• get
LookOffset(): Vector3
Calculated offset of the camera from its target.
Returns
MaxZoomDistance
• get
MaxZoomDistance(): number
Calculated maximum distance the camera can zoom out from the target.
Returns
number
MinZoomDistance
• get
MinZoomDistance(): number
Calculated minimum distance the camera can zoom in towards the target.
Returns
number
Sensitivity
• Sensitivity: Object
Speed
• Speed: Object
StateMachine
• get
StateMachine(): StateMachine$1
<CameraState
>
Retrieves the camera state machine.
Returns
camera
• get
camera(): Camera
Unity Camera
.
Returns
cameraParent
• get
cameraParent(): Transform
Transform
of the camera parent object.
Returns
currentState
• get
currentState(): CameraState
Retrieves the current camera state.
Returns
currentStateStatus
• get
currentStateStatus(): StateStatus
Retrieves the status of the current camera state.
Returns
distance
• get
distance(): number
Distance from the target.
Returns
number
isFollow
• get
isFollow(): boolean
Retrieves the flag indicating whether the camera is following the target.
Returns
boolean
position
• get
position(): Vector3
Retrieves the current camera position value.
Returns
rotation
• get
rotation(): Quaternion
Retrieves the current camera rotation value.
Returns
rotationDampSpeed
• get
rotationDampSpeed(): number
Interpolation speed for rotation.
Returns
number
• set
rotationDampSpeed(value
): void
Interpolation speed for rotation.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
rotationSpeed
• get
rotationSpeed(): number
Speed of rotation.
Returns
number
• set
rotationSpeed(value
): void
Speed of rotation.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
targetScaleWeight
• get
targetScaleWeight(): number
Weight applied to the target's scale to adjust the camera's position and behavior.
Returns
number
• set
targetScaleWeight(value
): void
Weight applied to the target's scale to adjust the camera's position and behavior.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
useCharacterCulling
• get
useCharacterCulling(): boolean
Indicates whether to enable character culling to prevent rendering issues at close camera distances.
Returns
boolean
• set
useCharacterCulling(value
): void
Indicates whether to enable character culling to prevent rendering issues at close camera distances.
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
useEnhancedOption
• useEnhancedOption: Object
zoomDampSpeed
• get
zoomDampSpeed(): number
Interpolation speed for zooming in and out.
Returns
number
• set
zoomDampSpeed(value
): void
Interpolation speed for zooming in and out.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
zoomSpeed
• get
zoomSpeed(): number
Speed of zooming in and out.
Returns
number
• set
zoomSpeed(value
): void
Speed of zooming in and out.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Methods
DoZoom
▸ DoZoom($delta
): void
Zooms the camera.
Parameters
Name | Type | Description |
---|---|---|
$delta | number | Zoom amount. |
Returns
void
Rotate
▸ Rotate($delta
): void
Rotates the camera.
Parameters
Name | Type | Description |
---|---|---|
$delta | Vector2 | Roate amount. |
Returns
void
SetFollowTarget
▸ SetFollowTarget($target
, $scaleReference?
): void
Sets the follow target for the camera.
Parameters
Name | Type | Description |
---|---|---|
$target | Transform | Transform representing the object that the camera should follow. |
$scaleReference? | Transform | Optional Transform used as a reference for scaling the camera's follow behavior. If provided, the camera will adjust its distance towards the target based on the scale of this reference. |
Returns
void
Create
▸ Static
Create($camera
, $data
): ZepetoCamera
Creates a ZepetoCamera
instance.
Parameters
Name | Type | Description |
---|---|---|
$camera | Camera | Unity Camera object to be used as the basis for the ZepetoCamera . |
$data | CameraData | Initial configuration for the ZepetoCamera . |
Returns
New instance of ZepetoCamera
.