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 / Sparky Collision Help

Author
Message
iSilver
13
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 21st Feb 2011 22:33
I'm having trouble with Planetary Gravity and Collisions in a Zero-G Space Flight game environment. I'm new to Dark GDK and SC_Collision.

I figured for Planetary Gravity, I'd use an invisible sphere that represents the Gravity Field, and check for Ship (or RenderableObjects in general) inside of it using something like SC_objectCollision. My problem is, when multiple objects are inside this field, I can't just use SC_objectCollision( object#, 0 ) to give me a list of collisions like I can with SC_multipleRayCast()

I have to do a:

SC_objectCollision (obj, 0) // check if anything is in the gravity field

for (...) {
// check every object in space to see if it collided
}

Doesn't seem very efficient. Any ideas?

Thanks in Advance,

Silver
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 22nd Feb 2011 01:09
When setting up objects its handy to put them into groups. I usually use a level group, player group, players bullets group, baddies group, baddies bullets group. That way you can just simply do a group collision per bullet against all the baddies.

Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-11-19 12:20:52
Your offset time is: 2024-11-19 12:20:52