Collisions > Basic


Actor 1 vs. Actor 2

Each block in this section lets you choose between Actor 1 and Actor 2. Collision events involve 2 actors. When the event is reported, the first actor in the event's block corresponds to Actor 1 and the second actor in the block corresponds to Actor 2.

explained

You can refer to Actor 1 and Actor 2 directly using the blocks embedded in the event itself.

explained-more


Collision Side

Top / Left / Bottom / Right Side was Hit

the top of actor 1 was hit the left side of actor 1 was hit
the bottom of actor 1 was hit the right side of actor 1 was hit

Returns true if the actor's [top/left/bottom/right] side was hit. If the collision shape is not a box, we still approximate the shape as a box to calculate this.

event.thisFromTop
event.thisFromLeft
event.thisFromBottom
event.thisFromRight

event.otherFromTop
event.otherFromLeft
event.otherFromBottom
event.otherFromRight

Collision Details

Group of Colliding Shape

group for actor 1 colliding shape

Returns the group of the shape for the "other" (or "second") object in the collision. In most cases, the group of the shape is the same as that of the actor, but that isn't always the case.

internalGetGroup(event.thisActor, event.thisShape, event)
internalGetGroup(event.otherActor, event.otherShape, event)

Hit an Actor / Terrain / Tile / Sensor

actor 1 hit an actor

Returns true if the "other" (or "second") object in the collision was an [actor / terrain region / tile / sensor].

event.thisCollidedWithActor
event.thisCollidedWithTerrain
event.thisCollidedWithTile
event.thisCollidedWithSensor