Interface ICollisionInfo2D
Interface for a Collider Shape of 2D physics.
Namespace: Evergine.Common.Physics2D
Assembly: Evergine.Common.dll
Syntax
public interface ICollisionInfo2D
Properties
ColliderA
Gets collider A in this contact.
Declaration
ICollider2D ColliderA { get; }
Property Value
Type | Description |
---|---|
ICollider2D |
ColliderB
Gets collider B in this contact.
Declaration
ICollider2D ColliderB { get; }
Property Value
Type | Description |
---|---|
ICollider2D |
Friction
Gets or sets the friction coefficient, usually in the range [0,1].
Declaration
float Friction { get; set; }
Property Value
Type | Description |
---|---|
float |
IsEnabled
Gets or sets a value indicating whether this contact is enabled. You can disable the contact in contact listener methods.
Declaration
bool IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsTouching
Gets a value indicating whether the two colliders is touching.
Declaration
bool IsTouching { get; }
Property Value
Type | Description |
---|---|
bool |
Normal
Gets the collision normals.
Declaration
Vector2 Normal { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Points
Gets the collision points.
Declaration
Vector2[] Points { get; }
Property Value
Type | Description |
---|---|
Vector2[] |
Restitution
Gets or sets the restitution (elasticity) usually in the range [0,1].
Declaration
float Restitution { get; set; }
Property Value
Type | Description |
---|---|
float |
TangentSpeed
Gets or sets the tangent speed.
Declaration
float TangentSpeed { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
FlagForFiltering()
Flag this contact for filtering. Filtering will occur the next time step.
Declaration
void FlagForFiltering()
ResetFriction()
Reset the friction mixture to the default value.
Declaration
void ResetFriction()
Remarks
You can modify contact properties in PreSolve/PostSolve methods in ContactListener.
ResetRestitution()
Reset the restitution to the default contact value.
Declaration
void ResetRestitution()
Remarks
You can modify contact properties in PreSolve/PostSolve methods in ContactListener.