Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hi, i have a box like obstacle in my game, but i want that the player collision with the left side of box lose, but if collision on top or any side, the game continues.
How can i do that??
I would suggest maybe create a sprite and pin it to the side of your rectangle where you want the collision to occur for you to lose. Make this sprite invisible. Then if your player collides with this invisible sprite, set your actions for your player.
Is a good idea, but the problem is that i have many boxes, but that boxes have the same properties.
Maybe this could help you with that
you could also look at the relative x (&y) coordinates of the two colliding sprites and make a decision on these
You could use 'overlapping at offset' if player and box both are solid.
Player Is overlapping Box at offset(1,0) -> die
Develop games in your browser. Powerful, performant & highly capable.
You might even be able to use the bounding box edges for checking, depending on the way you have set things up..