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 Discussion / Qucik Question on COllision

Author
Message
CKANE618
18
Years of Service
User Offline
Joined: 4th Dec 2006
Location:
Posted: 4th Dec 2006 17:59
Is there a way to do collisions with objects and sprites? I have a 2D game field with sprites, but I have a 3D ball which travels thru the field. I need to see if the 3D ball collides with a sprite in the field. I have over 190 sprites in which 1 3D object needs to see if if collides with. Anyhelp would be appreciated.

Chris
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 4th Dec 2006 20:07
I doubt you'll be able to do what you want. You're probably either going to have to change the object to a sprite or change the sprites to plains (which they really are in Pro but still act as if their separate).
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 4th Dec 2006 23:11
You've got 2 options really, the first being to create an invisible sprite that takes up the same screen space as the 3D object, and use that for checking 2D collisions. The second would be to create 3D invisible objects for each sprite, again taking the proper size into account, and checking for 3D collisions. Obviously the first is easier, but it depends on what you want to do, if you've got the time to create 3D models that are the same shape as every sprite, then adding 3D sliding collision to the sprites wouldn't be hard. 2D sliding collision is harder than you'd think, as in 3D, you have the angles of normals being hit, whereas in 2D all you have is pixel data.

Kyhoshi
18
Years of Service
User Offline
Joined: 21st Jun 2006
Location: Somewhere over the rainbow.
Posted: 25th Dec 2006 09:05
you could also try
but it takes a heckuva lot more work...

(\__/)
(O.o )
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination!

Login to post a reply

Server time is: 2025-05-27 04:18:34
Your offset time is: 2025-05-27 04:18:34