How do I find collision points?

0 favourites
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • i have a idear ,you can create detcorSprite useloop for 0 to Spritea.width for 0 to Spritea.height when collision happen,and find which detcor is overlapping two main Sprite ,so this detcor position is you want....

  • or you can create one detcor an set IT position use loop ,i think is more caculate if you have a big Sprite

  • wertt22 As I understand, your code will detect collision in this red point:

    You need to check if dec sprite overlaps both sprites. But this is a very ineffective method. With sprite size 300x300 px, the loop will repeat 90,000 times and there will be a considerable lag.

  • My code needs to be optimized. If the sprite is very large, it needs to narrow the scope of judgment

  • wertt22 As I understand, your code will detect collision in this red point:

    You need to check if dec sprite overlaps both sprites. But this is a very ineffective method. With sprite size 300x300 px, the loop will repeat 90,000 times and there will be a considerable lag.

    my sprite point0 is set at your red position

  • wertt22 As I understand, your code will detect collision in this red point:

    You need to check if dec sprite overlaps both sprites. But this is a very ineffective method. With sprite size 300x300 px, the loop will repeat 90,000 times and there will be a considerable lag.

    creat a big detect set position evey big detect,s size, when big detect overlap the sprite, use big detect spawn a mini detect ,then use mini detect set position to big detect ,so it can narrow the scope of judgment

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AnD4D It looks like in your C2 drawing example you used round cap?

    That's correct :) That's the thing I can't believe Construct 3 doesn't have. It only has a square or line cap. Neither of which looks very nice when used for drawing.

    I've put in a request for a round cap to be added, but I have no idea how long that's likely to take.

    Thanks for the plugin. I'll check it out. Also put in a request for us to be able to access these collision points without the need of a plugin. I'd rather run 8 checks per collision than 90,000.

  • can you help me how to get Sprite point position when Sprite rotate 0 to a angle thanks

  • That's correct :) That's the thing I can't believe Construct 3 doesn't have. It only has a square or line cap.

    Oh, sorry, I misunderstood you earlier - I thought you need to draw with square cap. I see you've already posted this idea, it seems like a simple change so hopefully will be implemented soon.

  • Oh, sorry, I misunderstood you earlier - I thought you need to draw with square cap. I see you've already posted this idea, it seems like a simple change so hopefully will be implemented soon.

    Not to worry! Thanks for your help!

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