How do I fix my collision issue

Get help using Construct 2

Post » Tue Feb 19, 2013 6:27 pm

I have no idea how to fix this collision issue I'm having.

Player hits collision area and stops, which is correct. But if i move again it goes through. Any ideas would be appreciated.

CapxHavok2013-02-19 18:27:52
B
19
S
3
G
4
Posts: 79
Reputation: 3,711

Post » Tue Feb 19, 2013 6:40 pm

From the manual:
On collision with another object
Triggered upon the first time any instance starts overlapping any instance of another object. The collision polygons are taken in to account if set, as well as the object's size and rotation.

'Is overlapping' might be better, but even then it doesn't prevent movement. You may have to add some extra logic to bump the player back, or use some of the available behaviours for blocking movement.
ImageImageImage
B
67
S
19
G
122
Posts: 3,207
Reputation: 73,401

Post » Tue Feb 19, 2013 9:13 pm

How about this?



B
44
S
15
G
9
Posts: 1,096
Reputation: 11,013

Post » Wed Feb 20, 2013 8:22 am

[QUOTE=blackhornet]

'Is overlapping' might be better, but even then it doesn't prevent movement. You may have to add some extra logic to bump the player back, or use some of the available behaviours for blocking movement.[/QUOTE]

yeah that's the problem it seems, it works out well at the collision point but thereafter it just goes through - i have tried is overlapping with similar or non functioning results.

[QUOTE=spongehammer] How about this?



[/QUOTE]

Spongehammer, I'll try that. So what that will do is check the direction of the collision / overlap and bump it back 1 pixel @ 180 degrees?
That could very well work. Such a simple solution actually.
I feel dumb.

I'll try it out and report back.
Thanks for the comments guys.
B
19
S
3
G
4
Posts: 79
Reputation: 3,711

Post » Sat Feb 23, 2013 8:28 am

Works well.
Thanks @spongehammer!
B
19
S
3
G
4
Posts: 79
Reputation: 3,711

Post » Sat Feb 23, 2013 9:18 am

Great :-) no problem.
B
44
S
15
G
9
Posts: 1,096
Reputation: 11,013


Return to How do I....?

Who is online

Users browsing this forum: Jarnopa, semaso, Yahoo [Bot] and 12 guests