Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I guess you should to make something like this:

//{Wall Script}

//Verify the collision
let collide = Sup.ArcadePhysics2D.collides(
           Sup.getActor('Car').arcadeBody2D, Sup.getActor('Wall').arcadeBody2D);

if (collide) {
console.log('Bateu!');
//Call Animation Sup.getActor('Car').spriteRenderer.setAnimation('Collision');
} else {
console.log('Driver Safe!');
}

I put my collision's scripts in the static actors (e.g. wall) when they start the event (collision), I just pick the actor in the scene that "hit" the my static actor and animate. Hope it helps :)