Make walls 'smooth'

0 favourites
  • 13 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • How would I make my walls let objects 'smoothly' interact with them - i.e. at the moment, whenever my character now makes contact with the wall, it 'sticks' to the wall and has to move directly away from it before it can do anything. I would rather the object 'slide' along the wall.

  • The character at the moment has 8-directional movement behavior and the walls have the solid behavior.

  • Do you have a small project file to post so we can see it in action? There are any number of reasons that a wall would do that.

    I know I had a problem with sticking on my platform game until I completely flattened the ground (IE made sure each ground part was exactly the same Y coordinate and all my walls were EXACTLY the same X coordinate) but something tells me that my idea may be a nonissue for you, particularly if the wall is one sprite.

  • I think I know the problem. The player rotates so the corner of the collision square is sticking into the walls... The wall is at the moment one simple rectangular sprite.

    Any way to fix this?

  • Yes this is certainly the problem, if i turn off the rotation it works like a charm.

    So, I need a fix to the corner of the collision box sticking into the wall.

  • I just had a quick go and the 8 direction doesn't stick to walls here.

    Can you post a .capx showing what you mean?

  • Here is a quick example... drive it into the walls using the arrow keys and you see some very irritating stickiness. This also looks worse in a game where my vehicle is not square at all.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • mediafire.com

  • Please, use DropBox (quicker, simpler, if you want to upload exported projects you don't need to zip them).

    Also to make a capx, in C2 look into the menu - save as single file.

    An exported project, as you provided, can't allow to check effectively if there's a bug or a logic error.

  • Oh shoot... sorry mate, of course I should have made a .capx but I forgot.

    Anyway, it's certainly not a logic error - there is only one line on the event sheet, and that is for the rotation. The rest is for the 8 direction behaviour.

    Also, I didn't have the time to set up a dropbox account, as I'm getting ready for school.

  • OK here is the example, using the object from the actual game (I can see that it's a bit wonky... I will get to that I guess)

    dl.dropbox.com/u/41931267/Example%20Sticky.capx

  • Ah, I see. It's rotating so it's stuck inside the walls. I've corrected it for the next build so you don't get stuck, but it's still bounding-box collision (imagine the background is a solid colour - that's how it's colliding). So it gets pushed out some distance from the wall. Once polygon collisions are added it should be a bit better.

  • Oh, great! thanks Ashley!

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