Collision
:Collision resolution data.
group
Math
source
: GameObjThe first game object in the collision.
target
: GameObjThe second game object in the collision.
normal
: Vec2The contact normal.
distance
: Vec2The length of the displacement.
displacement
: Vec2The displacement source game object have to make to avoid the collision.
resolved
: booleanIf the collision is resolved.
preventResolution
(): voidPrevent collision resolution if not yet resolved.
since
v3000.0
hasOverlap
(): booleanIf the 2 objects have any overlap, or they're just touching edges.
since
v3000.0
reverse
(): CollisionGet a new collision with reversed source and target relationship.
isTop
(): booleanIf the collision happened (roughly) on the top side.
isBottom
(): booleanIf the collision happened (roughly) on the bottom side.
isLeft
(): booleanIf the collision happened (roughly) on the left side.
isRight
(): booleanIf the collision happened (roughly) on the right side.