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 / 2 small questions

Author
Message
Vennom
13
Years of Service
User Offline
Joined: 25th Apr 2011
Location: Bouncing between some bits
Posted: 26th Apr 2011 01:51
Hi,
I was trying to code a small tower-defense game, and i had a problem and a question xP

1- I managed to create a real bad 3d model, loaded it into the scene (everything OK til here, it loads correctly) and then i try to use dbCloneObject but, it looks like its not copying what i wanted to copy, im quite sure i done it correctly, ill send the code in the bottom of this post if anybody wants to take a look (the parts that loads this model are actually commented, but are still there and can be understood)

2- I wanted to know if is there any function in GDK to check if there is an object in a certain radius around another object (ex. i have a block in 0,0,0 and sphere in 10,10,10 , so i wanted to check if there is any sphere in a radius of 100 from the block, all spheres have ID between 5000~10000)

Here is the code:
http://pastebin.com/6fmzTUgB

Thanks in advance
Superdeath360
13
Years of Service
User Offline
Joined: 23rd Nov 2010
Location:
Posted: 6th May 2011 04:22
You could use the distance formula (http://www.purplemath.com/modules/distform.htm) to check if any sprite is less than a certain distance from the center of the object.

herp derp

Login to post a reply

Server time is: 2024-11-19 10:23:45
Your offset time is: 2024-11-19 10:23:45