Info about two entities that were colliding in the 3D Physics. More...
Public Attributes | |
readonly bool | IsStatic => _staticIndex >= 0 |
If the Entity was touching a static collider. If so, Other has an EntityRef.None value and the static collider data can be accessed through StaticData. More... | |
readonly StaticColliderData | StaticData => _staticIndex >= 0 ? _map.StaticColliders3D[_staticIndex].StaticData : default |
The StaticColliderData of the static collider if the Entity was colliding with a static (check IsStatic). More... | |
Properties | |
readonly EntityRef | Entity [get] |
The main entity that was involved in the collision. More... | |
readonly EntityRef | Other [get] |
The other entity that was involved in the collision if the Entity was NOT colliding with a static (check IsStatic). More... | |
Info about two entities that were colliding in the 3D Physics.
The info is taken from the perspective of the entity that has subscribed to the callback with Quantum.Physics3D.PhysicsEngine3D.SetCallbacks.
If both entities involved in a collision have subscribed to this collision type callback, it will be called twice, each time carrying information from the perspective of one of the entities.
See CollisionInfo3D for 3D collisions and TriggerInfo3D for 3D trigger collisions.
readonly bool Quantum.ExitInfo3D.IsStatic => _staticIndex >= 0 |
If the Entity was touching a static collider. If so, Other has an EntityRef.None value and the static collider data can be accessed through StaticData.
if (info.IsStatic) { var otherStaticData = info.StaticData; } else { var otherEntity = info.Other; }
readonly StaticColliderData Quantum.ExitInfo3D.StaticData => _staticIndex >= 0 ? _map.StaticColliders3D[_staticIndex].StaticData : default |
The StaticColliderData of the static collider if the Entity was colliding with a static (check IsStatic).
|
get |
The main entity that was involved in the collision.
The info is taken from the perspective of this entity, which has subscribed to the callback with Quantum.Physics3D.PhysicsEngine3D.SetCallbacks.
If both entities involved in a collision have subscribed to this collision type callback, it will be called twice, each time carrying information from the perspective of one of the entities.
|
get |
The other entity that was involved in the collision if the Entity was NOT colliding with a static (check IsStatic).
If the Entity was colliding with a static, Other has EntityRef.None value.