C# Class Nez.CollisionResult

Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
collider Collider
minimumTranslationVector Vector2
normal Vector2
point Vector2

Méthodes publiques

Méthode Description
ToString ( ) : string
invertResult ( ) : void

inverts the normal and MTV

removeHorizontalTranslation ( Vector2 deltaMovement ) : void

alters the minimumTranslationVector so that it removes the x-component of the translation if there was no movement in the same direction.

Method Details

ToString() public méthode

public ToString ( ) : string
Résultat string

invertResult() public méthode

inverts the normal and MTV
public invertResult ( ) : void
Résultat void

removeHorizontalTranslation() public méthode

alters the minimumTranslationVector so that it removes the x-component of the translation if there was no movement in the same direction.
public removeHorizontalTranslation ( Vector2 deltaMovement ) : void
deltaMovement Vector2 the original movement that caused the collision
Résultat void

Property Details

collider public_oe property

the collider that was collided with
public Collider,Nez collider
Résultat Collider

minimumTranslationVector public_oe property

The translation to apply to the first shape to push the shapes appart
public Vector2 minimumTranslationVector
Résultat Vector2

normal public_oe property

The normal vector of the surface hit by the shape
public Vector2 normal
Résultat Vector2

point public_oe property

not used for all collisions types! Check the ShapeCollisions class before relying on this field!
public Vector2 point
Résultat Vector2