How Solid Behavior works with enclosing spaces.

Get help using Construct 2

Post » Sun Mar 10, 2013 7:02 pm

Let's say I am making some top down game. Let's also say I am making a circular room that I want to be solid and keep the player from going outside of it. Can I make a large graphic in the shape of a circle, place the player inside of it, and have it contain that player? I have tried this, and the player warps outside the bounds of the circle graphic. I assume this is because the collision detection senses this as a collision, even if the central area is empty and so is the corresponding alpha channel. If this is the case, what is the best way to create my circular room and have collision detection work correctly?
B
11
S
4
G
1
Posts: 159
Reputation: 1,803

Post » Sun Mar 10, 2013 7:20 pm

Have your circular image with no solid behavior. Then add invisible solid sprites and put them around the edges of the walls. If you add the solid behavior to an object, the inner part of the collision polygon is solid, not the outside.
B
40
S
12
G
7
Posts: 603
Reputation: 7,656

Post » Mon Mar 11, 2013 12:52 pm

I was afraid of that. Thanks!
B
11
S
4
G
1
Posts: 159
Reputation: 1,803

Post » Mon Mar 11, 2013 2:36 pm

It sounds like you have the collision polygon covering the whole image. You need to change it to only cover the outer edge by having both outer and inner boundaries on it.
B
6
S
1
Posts: 67
Reputation: 986


Return to How do I....?

Who is online

Users browsing this forum: nimos100 and 22 guests