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
22
S
7
G
6
Posts: 220
Reputation: 3,630

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 Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
129
S
43
G
18
Posts: 2,241
Reputation: 20,644

Post » Thu Jun 04, 2015 10:52 am

Thanks, that confirms my assumptions!!
B
22
S
7
G
6
Posts: 220
Reputation: 3,630


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests