Skip to content
Advertisement

Tag: collision

How to handle collisions in Phaser

I want to make objects push away from each other in my Phaser game (arcade physics). To do so I’ve tried to use the collider function: But I always get TypeError: undefined is not an object (evaluating ‘t.isParent’) It looks like this is error rises during the update process as it’s risen thousand times a minute… I’m using Phaser 3

Collision in canvas javascript game

I added collision to my game but I have a problem. But first I´ll give you some background. I have this: On update(); function I have this: That is used here: Note: wPlayer and hPlayer are the width and height of the player, as the animation is done through a spritesheet. xPlayer and yPlayer are the positions of the Player

Advertisement