differences in coliision types.

For questions about using Classic.

Post » Mon Jun 01, 2015 2:19 pm

Hi guys. Just a few general queries about some collision types.

1. whats the difference between per pixel collision and a collision mask? I ask because both seem to be bitmap based, so is there anything to lose or gain?

2. I noticed that my bullets disappeared too early due to bounding boxes making my object destroy the moment the edge touches the enemies, using POINT collision I got a better visual effect where the bullets destroyed overlapping the enemy halfway - is there any potential issues of point collistions not working or failing?

Thanks as always, just want to make sure I am not setting myself up for problems later.
B
9
S
4
G
5
Posts: 158
Reputation: 2,370

Post » Wed Jun 03, 2015 12:59 am

Hi work3, I'll try to explain these:

1. The per pixel collision relies on the "collision mask" to determine where to collide, so any non-invisible pixel in the collision mask is treated as the "solid" part of the sprite. The other type I think is Point, which collides at the single point of the hotspot of the sprite.

2. Point still works as long as your bullets aren't "instant hit" or moving too fast, in which case you can use the step checks to see if an overlap would occur.

Hope that helps :)
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
113
S
39
G
17
Posts: 2,184
Reputation: 19,217

Post » Thu Jun 04, 2015 10:52 am

Thanks, that confirms my assumptions!!
B
9
S
4
G
5
Posts: 158
Reputation: 2,370


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 11 guests