C# Класс Nez.CollisionResult

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
collider Collider
minimumTranslationVector Vector2
normal Vector2
point Vector2

Открытые методы

Метод Описание
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.

Описание методов

ToString() публичный Метод

public ToString ( ) : string
Результат string

invertResult() публичный Метод

inverts the normal and MTV
public invertResult ( ) : void
Результат void

removeHorizontalTranslation() публичный Метод

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
Результат void

Описание свойств

collider публичное свойство

the collider that was collided with
public Collider,Nez collider
Результат Collider

minimumTranslationVector публичное свойство

The translation to apply to the first shape to push the shapes appart
public Vector2 minimumTranslationVector
Результат Vector2

normal публичное свойство

The normal vector of the surface hit by the shape
public Vector2 normal
Результат Vector2

point публичное свойство

not used for all collisions types! Check the ShapeCollisions class before relying on this field!
public Vector2 point
Результат Vector2