0 Favourites

Collision masks

This forum is currently in read-only mode.
  • I'm having problems with collision masks and gravity in that even if there is an overlap of 1 pixel, the collision will stop the object from falling.

    Eg:

    Here's the collision mask for the left edge of this level:

    <img src="http://i45.tinypic.com/ezlwkl.jpg" border="0" />

    When the player jumps onto the left, he shouldn't stop, he should slide down... but this is what happens instead:

    <img src="http://i45.tinypic.com/20tjy2o.jpg" border="0" />

    It's causing a bunch of problems, especially with the "wall to left" and "wall to right" conditions - even if the "wall" is just 1 pixel higher than the ground, things will bounce off it (as asked to do when the condition is met).

    Any ideas how to deal with this?

    Example of the problem in action:

    [TUBE]http://youtu.be/pwDIz2HsVTs[/TUBE]

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • You could use a separate object for the slope and make it solid. Then detect when the player is on the slope with "player is overlapping slope an offset (0,1)" and move the player off the slope with "player: set x to player.X+1" to make it slide.

  • Thank you. Not the ideal solution, but it does the job :D

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
64 4,529
nimos100's avatar
nimos100
Unread hot topic
42 3,711
CaptainOblivious's avatar
CaptainOblivious
Unread hot topic
0 Favourites
How to make a Mask?
26 2,345
LaDestitute's avatar
LaDestitute