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.

Dark GDK / Help Forum So please help

Author
Message
Dragon Tiger Wolf Bald Eagle
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 16th Mar 2008 06:35
Using Dark GDK Not anything someone else made using it or something But using Just Dark GDK please show me a fuctioning example of some programing that prevents two objects from moving through each other when you move one object.

The quality of what a man gives without seeking anything in return shows his integrity.
MrSnowman
17
Years of Service
User Offline
Joined: 23rd Jun 2007
Location: Oregon, USA
Posted: 19th Mar 2008 20:32
This is a VERY basic sphere collision program I wrote. If you're looking for something more complex and better, get Sparky's Collision lib.

This program creates 2 randomly sized/colored spheres and lets you control one.
Copy & paste this code into VC++ and run it (takes no media files):



One thing I found when creating this function is that the input for dbMakeObjectSphere (2rd arguement) is stated incorrectly as the radius. It is ACTUALLY the diameter.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 19th Mar 2008 21:49
I saw a thread in the DBPro forum with this exact same title.

Next time use a more descriptive title for your question such as "Need help with collision.". You'll probably get help faster, and it will show up in future searches when other people are looking for help with the same thing.

Login to post a reply

Server time is: 2024-11-20 05:21:58
Your offset time is: 2024-11-20 05:21:58