Pixel-perfect collision with bullets

  • 4 favourites

Attached Files

The following files have been attached to this tutorial:

.capx

bulletandpixelperfectcollisions.capx

Download now 173 KB

Stats

1,292 visits, 1,824 views

Translations

This tutorial hasn't been translated.

Tools

Hi there,

This is a short tutorial on how to create pixel-perfect collisons with bullets. I will share my experience too about how its best to make it work.

The idea is basically to use a LOOP to move your bullet instead of using the bullet behavior. This is more precise.

Important note

I found something interesting... when you actuall create your bullet be sure it is positionned at an integer value position which mean you have to round it cause it will create problem once it reach the wall. The collision work with pixel integer value so if your bullet is created at lets say x: 233.444 it will move along the non-integer value of .444 and when it reach the wall it will obviously pass the wall off 1 pixel. The project option round pixel doesn't seem to fix this issue so be careful.

@Thanks to MadFactory since he referenced a MMF base idea on how to do it.

.CAPX

bulletandpixelperfectcollisions.capx

Download now 173 KB
  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!