C# Class Nez.CollisionResult

Datei anzeigen Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
collider Collider
minimumTranslationVector Vector2
normal Vector2
point Vector2

Public Methods

Method 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 method

public ToString ( ) : string
return string

invertResult() public method

inverts the normal and MTV
public invertResult ( ) : void
return void

removeHorizontalTranslation() public method

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
return void

Property Details

collider public_oe property

the collider that was collided with
public Collider,Nez collider
return Collider

minimumTranslationVector public_oe property

The translation to apply to the first shape to push the shapes appart
public Vector2 minimumTranslationVector
return Vector2

normal public_oe property

The normal vector of the surface hit by the shape
public Vector2 normal
return Vector2

point public_oe property

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