Posted: 21st Jun 2007 18:01
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 purchase plugins to have proper collision detection of polygon based objects?

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
Posted: 21st Jun 2007 18:18
First of all, it's unusual to have triangle objects in a 3D game used like you appear to be using them. So, I'm not 100% sure if this is a 2D game or a 3D game.

If it's a 2D game then your triangles should be sprites and Object Collision doesn't come into it.

But, if it is 3D then Set Object To Polygons should work OK - with one proviso - in DBC, you cannot use Scale Object if you want to use collision boxes, as they are not scaled with the object. You need to create the triangles the correct size in the first place.

Wasn't sure which forum to post this in.


As long as you are using DB Classic it's OK here.

TDK_Man
Posted: 21st Jun 2007 18:59
Yea. I goofed. Wrong forum. Thanks for the info. It's for DB pro.

I found too many limitations with the sprites, transparency, rotation, etc. Besides if I render in 3D, there's some more built in cmds I can use like vector based direction/movement (unless you know of 2d based vectors I can use with the sprites). For instance, in 3d I can "point" an object at another and just "move forward". Also, I am starting with a 2d game, but it'll be much easier to take it 3d if the engine I make is already rendering in 3d.

I'll try it without scaling, though I'm fairly sure that I am not scaling in my latest tests.

I may end up having to use Nuclear Glory collision or Sparkys.