hitPosition
TypeScriptget hitPosition(): SDKHandleSwift declarationvar hitPosition: SIMD3<Float>Hit position relative to physics origin. In physics space.
struct · iOS 15.0+ · SDK 27.1
struct CollisionA container that holds collision state for the character controller. All coordinates are in _physics space_, the coordinate system of the physics simulation.
get hitPosition(): SDKHandleSwift declarationvar hitPosition: SIMD3<Float>Hit position relative to physics origin. In physics space.
set hitPosition(value: SDKHandle)Swift declarationvar hitPosition: SIMD3<Float>Hit position relative to physics origin. In physics space.
get moveDistance(): numberSwift declarationvar moveDistance: FloatMove distance controller was attempting to move. In physics space.
set moveDistance(value: number)Swift declarationvar moveDistance: FloatMove distance controller was attempting to move. In physics space.
get moveDirection(): SDKHandleSwift declarationvar moveDirection: SIMD3<Float>Move direction controller was moving (unit vector). In physics space.
set moveDirection(value: SDKHandle)Swift declarationvar moveDirection: SIMD3<Float>Move direction controller was moving (unit vector). In physics space.
static init(characterEntity: Entity, hitEntity: Entity, hitPosition: SDKHandle, hitNormal: SDKHandle, moveDirection: SDKHandle, moveDistance: number): CharacterControllerComponent_CollisionSwift declarationinit(characterEntity: Entity, hitEntity: Entity, hitPosition: SIMD3<Float>, hitNormal: SIMD3<Float>, moveDirection: SIMD3<Float>, moveDistance: Float)Create Collision and initialize all fields.
get characterEntity(): EntitySwift declarationvar characterEntity: EntityEntity owning the character controller component.
set characterEntity(value: Entity)Swift declarationvar characterEntity: EntityEntity owning the character controller component.
get hitEntity(): EntitySwift declarationvar hitEntity: EntityThe entity that was hit by the character controller.
set hitEntity(value: Entity)Swift declarationvar hitEntity: EntityThe entity that was hit by the character controller.
get hitNormal(): SDKHandleSwift declarationvar hitNormal: SIMD3<Float>Hit normal relative to physics origin. In physics space.
set hitNormal(value: SDKHandle)Swift declarationvar hitNormal: SIMD3<Float>Hit normal relative to physics origin. In physics space.
No declarations were skipped in this snapshot.