[SOLVED] How do I make movement near solid objects smooth?

Get help using Construct 2

Post » Mon Aug 31, 2015 4:32 pm

Hey, I have a game where you control circular objects with 8Direction behavior, which you know is blocked by solids. There are also solid rectangles on the map that could be at different angles. You're not supposed to be able to pass through them, which works fine, but my problem is that movement near those objects is not smooth, especially when the solid object is at 45° or something like that. You usually have to move your 8Direction object back to continue moving, which is pretty annoying already, but sometimes it even gets stuck.

I use cut transparent pixels, and my collision polygons are fine.

How can I solve it without involving Physics?

P.S.: I'm intentionally not posting the capx, because it's a pretty hefty one with hundreds of events, and I think it's a general enough scenario.

Thanks
Last edited by johnsrd01 on Tue Sep 08, 2015 12:25 pm, edited 1 time in total.
B
10
S
3
Posts: 28
Reputation: 756

Post » Tue Sep 01, 2015 3:52 pm

Still trying to figure it out, any suggestions would be greatly appreciated.
B
10
S
3
Posts: 28
Reputation: 756

Post » Tue Sep 01, 2015 4:24 pm

You could try "Push out solid".

Rex has it in one of his plugins, and there is also a version in the custom movement behavior.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Tue Sep 01, 2015 4:49 pm

Thanks for the reply lennaert, the rex plugin did make it better. Still not exactly what I was looking for, but I don't even know if it's possible in C2 without involving Physics.

Imagine a 250x30 solid rectangle on the layout with it's angle set to 45°. I have a 130x130 circular object (not solid) with 8Direction behavior. When you move it up against the side of the rectangle, that's when these weird things happen. This "push out" thing basically prevents them, but what I was looking for is a smooth "sliding" movement along the side of the rectangle, when the 8Direction object is pushed against it.

I could settle for this solution, but if somebody has any idea, please let me know.

Thanks
B
10
S
3
Posts: 28
Reputation: 756

Post » Mon Sep 07, 2015 11:33 pm

B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Tue Sep 08, 2015 12:25 pm



Thanks man, exactly what I was looking for!
B
10
S
3
Posts: 28
Reputation: 756


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests