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

0 favourites
  • 8 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • 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

  • Still trying to figure it out, any suggestions would be greatly appreciated.

  • 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.

  • 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

  • johnsrd01

    Try this one:

  • johnsrd01

    Try this one:

    Thanks man, exactly what I was looking for!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • R0J0hound Do you still have the solution for this? Link seems to have disappeared.

  • construct.net/en/forum/construct-2/how-do-i-18/8-direction-behavior-slide-95148

    I think that was the topic. Later posts have a more refined solution.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)