One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

CollisionEvents.Updated

struct · iOS 13.0+ · SDK 27.1

struct Updated

An event raised on every frame when two objects are in contact.

Members (7)

get · iOS 18.0+

impulseDirection

TypeScript
get impulseDirection(): SDKHandle
Swift declaration
var impulseDirection: SIMD3<Float> { get }

The direction of the total impulse in scene coordinate space.

get · iOS 18.0+

penetrationDistance

TypeScript
get penetrationDistance(): number
Swift declaration
var penetrationDistance: Float { get }

The estimated distance of overlap between the two colliding entities in scene coordinate space. This is the maximum penetration distance for all contacts, for more detailed penetration distance see ``contacts`` and ``CollisionComponent/CollisionOptions-swift.struct/fullContactInformation``.

get · iOS 13.0+

entityA

TypeScript
get entityA(): Entity
Swift declaration
let entityA: Entity

The first entity involved in the collision.

get · iOS 13.0+

entityB

TypeScript
get entityB(): Entity
Swift declaration
let entityB: Entity

The second entity involved in the collision.

get · iOS 13.0+

impulse

TypeScript
get impulse(): number
Swift declaration
let impulse: Float

The total impulse in this collision pair obtained by adding up all the individual impulses applied at each contact point

get · iOS 18.0+

contacts

TypeScript
get contacts(): Array<Contact>
Swift declaration
var contacts: [Contact] { get }

All contacts between the collision pair. Empty if all contact information is not requested. @see `CollisionComponent.CollisionOptions.fullContactInformation`

get · iOS 13.0+

position

TypeScript
get position(): SDKHandle
Swift declaration
let position: SIMD3<Float>

A position representing the estimated point of contact. The point is an average calculated from the intersecting shapes. It’s specified in the coordinate space of the physics simulation, which means it’s relative to ``PhysicsSimulationComponent/nearestSimulationEntity(for:)``. If the physics origin is `nil`, the point is given in scene space.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →