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 / I need help with collision

Author
Message
JohnFP
21
Years of Service
User Offline
Joined: 5th Feb 2004
Location: Maryland
Posted: 12th Feb 2004 16:46
I have researched and cannot find what I am doing wrong. I cannot find a great deal of info on collisions. I am trying to look at sample programs and it seems I have everything in order but the collisions do not work.

My first question is, Can you somehow view a collision box that you created so you can see how it relates to the object/

Second, If I make an object with Anim8or and export it as a 3ds file and then load it. How can I get a collision box to follow it if it is moved.

Lastly, I have attached my code, can anyone see what I am doing wrong? What I am trying to do is when my laser light sphere hits the object basemirror it should rotate the laser light sphere 90 degrees such that it changes direction as if it bounced off the mirror. The mirror is set to 45 degrees.

Also, how do I attach the 3ds file such that potential helpers can run my program without errror?

Thank you in advance,
John
JohnFP
21
Years of Service
User Offline
Joined: 5th Feb 2004
Location: Maryland
Posted: 12th Feb 2004 16:51
Sorry, I thought collision was not working but it seems my rotation of the sphere is faulty. I did a xrotate and the ball hit the mirror and went down. I just need to get it to bouce in the correct direction now.

Thanks anyway and I hope I did not waste anyone's time.

Peace!
JohnFP
21
Years of Service
User Offline
Joined: 5th Feb 2004
Location: Maryland
Posted: 12th Feb 2004 16:54
OK, here it is, I thought the yrotate was cummulative but it is not. It is relative to the creation of the object. I rotated the sphere 90 degrees initially and when it hits the mirror I want it to yrotate 180 not an additional 90.
Dmitry K
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Russia
Posted: 12th Feb 2004 18:10
Look an example of a rebound from my library DBEMathsLib. It is not the answer to your question, but it can help you.
http://darkbasicpro.thegamecreators.com/?m=forum_view&t=20490&b=5

Specs: P4 2.4GHz, DIMM 256 266Mhz, 60GB HD 7200rpm ATA-133, GeForce 4 MX440, CD-RW+DVD, WinXP
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 12th Feb 2004 19:44
We built a DLL library to handle fast and accurate collisions for DBC and DBPro. It is worth a look. Link to our website is below.

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com

Login to post a reply

Server time is: 2025-05-22 21:37:08
Your offset time is: 2025-05-22 21:37:08