Understanding Collision Masks?

For questions about using Classic.

Post » Wed May 02, 2012 8:13 pm

Let's say, for example, that I have created a quick circle in photoshop then created a glow effect around the edges which fades into 0% transparency. It was my understanding that creating the same exact circle without the glow effect as a collision mask so another sprite would not officially collide with the original circle when overlapping the transparent glow.

Atleast I thought this was the correct way to work with collision masks. The only way I could get the collision to work correctly was by making the mask much, much smaller than the original.

Am I missing something? Can someone explain how the collision masks work within construct?
B
2
G
1
Posts: 37
Reputation: 524

Post » Wed May 02, 2012 9:43 pm

So if I understand you correctly, you don't want collisions to reach the original circle (Without glow effect)?

What method did you use for making the collision mask? If you haven't tried it already, I would suggest making it in the animator tab. Make an animation called "Collision mask", then make a slightly larger circle than the original (By a few pixels or so), add it to the first frame of the collision mask animation. After you've successfully added that, right click the frame and choose "Copy collision mask to each frame".

Just as a fair warning, this will make every frame of animation you may have for the circle the collision mask, so save before just in case.

After you've applied that, it should work the way you want it to. Though if you already tried that, I've got nothing else.
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Wed May 02, 2012 9:54 pm

Actually no, I want the colliding sprite to pass through the glow effect and only collide once it reaches the actual circle. I am just trying to understand how to correctly make collision masks within construct.

I created a black circle the exact same size as the original circle and used it as the collision mask but it was still colliding a few pixels off. I kept decreasing the size of the black circle until it registered correctly but the end result ended up being black circle less then half the size of the original.

I am confused because I figured the mask would be pixel specific.
B
2
G
1
Posts: 37
Reputation: 524


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests