Kanda Players 0.7.0
|
The Kanda SDK provides a flexible system for player movement that handles both VR and non-VR (PC) players. The system includes "flying", teleportation, and collision handling.
Player movement relies on the standard physics layers defined in the Foundation package. The following layers are particularly important:
Layer | Purpose | Usage |
---|---|---|
TeleportTarget | Surfaces that players can teleport to | Required for teleport floor colliders |
MovementBlocker | Surfaces that block player movement | Optional for non-teleportable barriers |
To create a teleport floor, add the TeleportFloor
component to your entity. This automatically configures the entity to use the TeleportTarget
physics layer.
Objects that should block player movement but not be teleport targets can use either layer:
TeleportTarget
for surfaces that can be both teleported to and collided withMovementBlocker
for surfaces that should only block movementThis separation allows for:
PC player movement is controlled through:
PC player movement is affected by the PcPlayerSettings
component, managed by the PlayerSettingsSystem
, which controls settings like sensitivity and speed.
The PcHeadMovementBlockerClientSystem
handles collisions by:
TeleportTarget
or MovementBlocker
:VR player movement supports:
Teleportation in VR is triggered by:
PcHeadHitCollider
component is present and enabledTeleportFloor
component is addedTeleportTarget