platform behavior behind solid

Get help using Construct 2

Post » Wed Jan 28, 2015 2:18 pm

hi,
in some cases my player (platform behavior) move behind solid objects. see screenshot.
i'm using
touch is in touch - player move forward 1 pixels

thanks
You do not have the required permissions to view the files attached to this post.
B
5
Posts: 42
Reputation: 313

Post » Wed Jan 28, 2015 4:56 pm

"Player move forward one pixel" is not using the platformer behavior, and therefore can move through solid objects. (but will not fall through them.)
You might want "Platformer Simulate Control Right"
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Wed Jan 28, 2015 6:59 pm

Or if you want to keep it the way you did it, just put all your solid objects into a family (which you could call "solids") and then add a second condition to your event to make sure that it runs only when your player isn't overlapping any object from the "solids" family.
- Touch : is in touch
- Player : isn't overlapping "solids"
> Player : move forward 1 pixel
B
11
S
3
G
3
Posts: 206
Reputation: 2,379

Post » Wed Jan 28, 2015 7:05 pm

Won't it be overlapping when it's standing on a solid?
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Wed Jan 28, 2015 7:20 pm

@kan
@Unnatural20
thx for your tips, i'll try both of them.
just wonder why it only happens in some cases. i added the platform behavior only to prevent moving through solids.

forgott to mention that i've also a condition

touch is in touch - set player angle touch.x touch.y

maybe it has to do with the angle condition

thx!
B
5
Posts: 42
Reputation: 313

Post » Wed Jan 28, 2015 11:13 pm

@metameta : I think it might have more to do with the angle position indeed.

@Unnatural20 : From what I could see, behaviours that are packed with Construct handle collision with solids differently than how you or I could handle it. So no, a platformer object standing on a solid is apparently not "overlapping" the solid (I had to use "overlap at offset" to check on which solid object my player was standing in a platformer game I made).
B
11
S
3
G
3
Posts: 206
Reputation: 2,379


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 16 guests