0 Favourites

Perfect Isometric Collisions?!

This forum is currently in read-only mode.
  • Hey everyone, this is from a question in my 'Isometric Stuff' thread in 'Your Creations', I figured I would be better off putting in here.

    Basically, I want pixel perfect collisions in isometric space. The isometric example that rojohound put up was great, but it wasn't pixel perfect. By that I mean, when something collides with something else, I want them sitting hard up against each other with no space in between.

    Now my objects all have 'bounding box' variables, so their shape and size is defined by numbers.

    They also have a 'flag' to test if they're moving or not, they have an 'xVelocity' and 'yVelocity' variable (zVelocity later ) which is how many pixels the object will move along the isometric X or Y axis the next tick (It's usually a decimal number as it uses timedelta).

    I can already successfully test whether or not an object is colliding, the only problem I'm having is getting it to sit still and hard up against the object it's colliding with

    Here's one of my versions of it:

    http://dl.dropbox.com/u/1289341/ISOengineCollisionTest2.cap

    Note: The family variables, 'realX' and 'realY' are just there to record the fractional XY co-ordinates, if I could find a way to do this reliably without them, I would love to!

    If I use the actual XY co-ordinates to move them, due to the rounding involved, it makes slow movement impossible.

    I've tried various approaches, moving the object, checking for collision, moving it back 1 pixel in the direction it came from until it is no longer colliding etc, but nothing seems to work properly. This could be due to the wrong events on my part, which is why I WOULD LOVE ANY HELP ON THIS!

    Thanks to everyone in advance!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
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
0 Favourites
My isometric RPG
99 15,184
TELLES0808's avatar
TELLES0808
Unread hot topic
73 8,290
Phoenixbowman's avatar
Phoenixbowman
Unread hot topic
0 Favourites
Isometric multiple floors
74 9,717
eleanorawesome's avatar
eleanorawesome