Transform Setter
This component belongs to the following package:
- com.yahaha.sdk.horrorgame
This Transform Setter (Component) teleports a target, such as a game object, the player avatar, or the main camera to a specified position and/or rotation. It can optionally apply an offset based on another object's transform.
Target priority
If multiple target options are set simultaneously, only one will take effect according to the following priority (highest to lowest):
- Target Game Object
- Set Local Player Avatar
- Set Main Camera
Properties
Properties | Description |
---|---|
Target Game Object | The game object to teleport. Has the highest priority over target options. |
Set Local Player Avatar | (Disabled by default) When enabled, teleports the first-person player avatar. Has priority over Set Main Camera but lower than Target Game Object. |
Set Main Camera | (Disabled by default) When enabled, teleports the main camera. Has the lowest priority among target options. Disabled by default. |
Offset Game Object | An optional reference object whose transform is used as an offset for teleportation. |
Position | The target position (XYZ coordinates) to teleport to. Requires a valid target. |
Offset Position | (Disabled by default) Controls how the teleport position is calculated when the action function is SetPosition or SetTransform in Event Trigger: If disabled, the target teleports directly to the specified Position. If enabled:
|
Rotation | The target rotation (XYZ Euler angles) to teleport to. Requires a valid target. |
Offset Rotation | (Disabled by default) Controls how the teleport rotation is calculated when the action is SetRotation or SetTransform in Event Trigger: If disabled, the target's rotation is set directly to the specified Rotation. If enabled:
|
Events and Actions
Events
- None
Actions
- SetTransform
- Description
- Follows the specified target, the absolute or relative position and rotation.
- Description
- SetPosition
- Description
- Follows the set absolute or relative position.
- Description
- SetRotation
- Description
- Follows the set absolute or relative rotation.
- Description
Related components
This component is usually used with Event trigger, which sets conditions and actions in response to an event or trigger.