Topic: [QUESTION] Detecting point of collision

Hi all, it's been a while smile

so I decided to pick up Open Surge again, as my engine of choice to create an arcade game.

One thing that struck me, is if it is even possible to determine the middle point of a collision, like where one object intersects the other. That I was never able to figure out, and don't even know if it is technically possible with the current API.

thoughts? roll

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: [QUESTION] Detecting point of collision

Hi KZR, welcome back.

What do you mean, the middle point of a collision? Are you using the bounding box method? If so, it's a math problem that you can solve with the current API.

Re: [QUESTION] Detecting point of collision

I mean, in an on_collision condition, is there a way to know where both objects are touching? I'm not sure what you mean with "bounding box method"

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: [QUESTION] Detecting point of collision

on_collision doesn't inform you of that, but you can calculate the exact area by using functions like xpos() and width().

See: https://wiki.allegro.cc/index.php?title=Bounding_Box

https://i.ytimg.com/vi/8b_reDI7iPM/maxresdefault.jpg

https://www.youtube.com/watch?v=8b_reDI7iPM