I don't want the corners of a square part of a collision

0 favourites
  • 8 posts
From the Asset Store
Tap the ball, control it, avoid touching spikes and score higher!
  • If two square objects are touching corners, they are considered colliding. I don't want that.

    [attachment=1:3bfsssw8][/attachment:3bfsssw8]

    I only want them to be considered colliding, if they are side by side.

    [attachment=0:3bfsssw8][/attachment:3bfsssw8]

    How do I do that? Thank you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can check their Y coordinates are equal and use that condition along with on collision. Same with X if you want them to stack.

  • Hi Doomeyes,

    Yes I think checking the coordinates is probably the answer.

    I have made a very rough capx file, which only incorporates one side, a drag and drop to help with the idea based and only on on y so you need a lot more smarts in there, but it may help? That's if this is what you wanted as I was not quite sure

    [attachment=0:3a2hwsvw][/attachment:3a2hwsvw]

    Cheers

  • Alternatively You can do this:

    First adjust the collision poly so it looks like >>

    Then set overlapping condition:

    If 4 side/direction are desired, change value 180 into 90 that represent angle variable. For more clarity how many loops must be iterate, add condition "For" and set value from 0 to 1 or 3.

  • You could just change the collision polygon to not include the corners.

  • Umm. That's a good idea blackhornet and probably what the poster is looking for. Didn't think of that

  • The thing is, those two stages do not describe the problem properly. The question is, how they should react in between those stages? Depending on that, there can be different solutions.

  • Thank you all for your help. I appreciate your time. I will play around with all of these and see which works best for what I am trying to do.

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