Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,619 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bounding box intersection question #134637
06/07/07 22:00
06/07/07 22:00
Joined: Aug 2005
Posts: 119
Madison, WI
J
JakeL Offline OP
Member
JakeL  Offline OP
Member
J

Joined: Aug 2005
Posts: 119
Madison, WI
Is there an easy way to check if the bounding box of one model is intersecting the bounding box of any other model without moving the models?

I scripted an asteroid maker which randomly creates asteroids at random positions, but I don’t want any to overlap. So, when each is created I would like it to check to see if it touches another asteroid (or any other model), and if it does, just remove it. There has to be a pretty easy way to do this, but I can’t seem to wrap my mind around it.

Thanks for any help.


If you need graphic resources, or just want to see some of my work, check out our site AdenFall Software.
Re: Bounding box intersection question [Re: JakeL] #134638
06/07/07 23:28
06/07/07 23:28
Joined: Sep 2002
Posts: 700
Orange County, CA
L
LogantheHogan Offline
Developer
LogantheHogan  Offline
Developer
L

Joined: Sep 2002
Posts: 700
Orange County, CA
try a scan_entity function with a small radius or maybe even trace.

Re: Bounding box intersection question [Re: LogantheHogan] #134639
06/08/07 00:10
06/08/07 00:10
Joined: Aug 2005
Posts: 119
Madison, WI
J
JakeL Offline OP
Member
JakeL  Offline OP
Member
J

Joined: Aug 2005
Posts: 119
Madison, WI
Thanks. I got it with this.

Code:
 if (c_scan(my.x, my.pan, vector(360,360,my.scale_x * 30),ignore_me) > 0)
{
ent_remove(me); //remove me
return; //break out of the function
}




If you need graphic resources, or just want to see some of my work, check out our site AdenFall Software.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1