Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Triangle Collision Detection?

Author
Message
destroy89
17
Years of Service
User Offline
Joined: 27th Jan 2007
Location:
Posted: 21st Jun 2007 19:04
Has anyone managed to perform collision detection properly on angled objects like triangles?

I want to be able to detect collisions like the image below, but when I use "set object collision to polygons <object #>" on both objects, the collision is detected far too late. If I use boxes based detection then it will detect too early. If I have one object set to boxes and the other to polygons, then it detects collisions properly for the one, but not for the other. Do I have to get plugins to have proper collision detection of polygon based objects? Well, I did get NGC a while ago, which I might use for this, but I wanted to do it with the regular engine. Also, I'm curious.



Also, see my other post about this in bug reports. Wasn't sure which forum to post this in.

http://forum.thegamecreators.com/?m=forum_view&t=108234&b=15

I also posted this in the classic forum by mistake.


GatorHex
19
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 21st Jun 2007 21:31 Edited at: 21st Jun 2007 21:34
The problem with polygon colission is that only 1 object is polygon the other is sphere.

If it's detecting it too early or too late you adjust the size of the collision sphere.

You can set your objects to show their collision areas which normaly makes it all easier to judge.

Probably Dark Physics would be your best bet if you have the money and you want your triangle to fall into place on top of each other free style Tetris like. Unless it's 2D then use an array matrix

Login to post a reply

Server time is: 2024-05-06 06:24:38
Your offset time is: 2024-05-06 06:24:38