Interface IQueryResult
Interface for query results.
Namespace: Unity.Physics
Syntax
public interface IQueryResult
Properties
ColliderKey
ColliderKey of the hit leaf collider.
Declaration
ColliderKey ColliderKey { get; }
Property Value
Type | Description |
---|---|
ColliderKey | The collider key. |
Entity
Entity of the hit body.
Declaration
Entity Entity { get; }
Property Value
Type | Description |
---|---|
Entity | The entity. |
Fraction
For casts this is fraction of the query at which the hit occurred. For distance queries, this is a distance from the query object.
Declaration
float Fraction { get; }
Property Value
Type | Description |
---|---|
Single | The fraction. |
Material
Material of the hit leaf collider.
Declaration
Material Material { get; }
Property Value
Type | Description |
---|---|
Material | The material. |
RigidBodyIndex
Index of the hit body in the CollisionWorld's rigid body array.
Declaration
int RigidBodyIndex { get; }
Property Value
Type | Description |
---|---|
Int32 | The rigid body index. |