impulseDirection
TypeScriptget impulseDirection(): SDKHandleSwift declarationvar impulseDirection: SIMD3<Float> { get }The direction of the total impulse in scene coordinate space.
struct · iOS 13.0+ · SDK 27.1
struct UpdatedAn event raised on every frame when two objects are in contact.
get impulseDirection(): SDKHandleSwift declarationvar impulseDirection: SIMD3<Float> { get }The direction of the total impulse in scene coordinate space.
get penetrationDistance(): numberSwift declarationvar 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 entityA(): EntitySwift declarationlet entityA: EntityThe first entity involved in the collision.
get entityB(): EntitySwift declarationlet entityB: EntityThe second entity involved in the collision.
get impulse(): numberSwift declarationlet impulse: FloatThe total impulse in this collision pair obtained by adding up all the individual impulses applied at each contact point
get contacts(): Array<Contact>Swift declarationvar contacts: [Contact] { get }All contacts between the collision pair. Empty if all contact information is not requested. @see `CollisionComponent.CollisionOptions.fullContactInformation`
get position(): SDKHandleSwift declarationlet 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.
No declarations were skipped in this snapshot.