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.

Newcomers DBPro Corner / object collision is not liking me

Author
Message
Feugsy
20
Years of Service
User Offline
Joined: 1st Nov 2004
Location: Australia
Posted: 27th Nov 2004 05:45
gday
im making a fps but m having problems with objet collision. i cannot get polygon jobject collision to work!!!!!!!!! it works with box and sphere collision perfectly well but im using large objects and this is really dodgy. could anyone give me some tips on what to check for when putting in object collision?

cheers

darkhorsegames.tk coming soon
thinkdigital
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 27th Nov 2004 05:54
It might help if we could see your source code, por favor?

"Never put off for tomorrow what you can put off for the day AFTER tomorrow..."

eGeneric Works DB site - www.egenericworks.com
Feugsy
20
Years of Service
User Offline
Joined: 1st Nov 2004
Location: Australia
Posted: 27th Nov 2004 16:09
ok here is an example for ya


load object "polygonscollisionhatesme.x",1
set object collision on 1
set object collision to polygons 1

do
if upkey()=1
create object sphere 2,10
set object collision on 2
set object collision to polygons 2
endif
move object 2,10
if object collision(1,2)>0
delete object 2
endif
loop


basically something like that. if the object collision = 0 it works proplerly but it must not detect the polygons of other objects
is there a way to correct this code
if i havent made myself as clear as i can be please tell me and ill be a bit more specific

cheers

darkhorsegames.tk coming soon
thinkdigital
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 28th Nov 2004 00:05
Strange. Do you use DBPro, or DBC. And the only other possible answer I see is that you're using object collision() for a sliding collision, I believe that might be wrong. In other words, the polygon collision might not apply when you use object collision(). I'm not positive, but I'm pretty sure...

"Never put off for tomorrow what you can put off for the day AFTER tomorrow..."

eGeneric Works DB site - www.egenericworks.com
Feugsy
20
Years of Service
User Offline
Joined: 1st Nov 2004
Location: Australia
Posted: 28th Nov 2004 18:17
i use dbc

and could you explain what sliding collision is? ur confusing me


cheers and thanx

darkhorsegames.tk coming soon
Zedane
20
Years of Service
User Offline
Joined: 3rd Nov 2004
Location: Milky Way, Earth
Posted: 28th Nov 2004 18:26
my 2 cents
hmm it may be the fact your setting it on polygons
try setting it to spheres... <set object collision to spheres>

http://img96.exs.cx/img96/2382/sasa.gif
around here.. normal's just a setting on a hair dryer
Zedane
20
Years of Service
User Offline
Joined: 3rd Nov 2004
Location: Milky Way, Earth
Posted: 28th Nov 2004 18:27 Edited at: 28th Nov 2004 18:30
hmm or you could try using just plain object collision
SET OBJECT COLLISION ON Object Number
both ways work fine... its just when you set it to polygons i think DB is having problems

<EDIT>
i just tested this would work ...

load object "polygonscollisionhatesme.x",1
set object collision on 1


do
if upkey()=1
create object sphere 2,10
set object collision on 2
endif
move object 2,10
if object collision(1,2)>0
delete object 2
endif
loop

http://img96.exs.cx/img96/2382/sasa.gif
around here.. normal's just a setting on a hair dryer
Feugsy
20
Years of Service
User Offline
Joined: 1st Nov 2004
Location: Australia
Posted: 28th Nov 2004 19:03
me again

i use sphere object collision for the bullet but it is just collsion with ohter things. box collision works perfectly but on some objects it does not work ill try that code and see fi it works but i swear i already have

cheers for that
dan
if any others have anything to say please go ahead and say it

darkhorsegames.tk coming soon
Zedane
20
Years of Service
User Offline
Joined: 3rd Nov 2004
Location: Milky Way, Earth
Posted: 28th Nov 2004 19:05
please show the code... that would help

http://img96.exs.cx/img96/2382/sasa.gif
around here.. normal's just a setting on a hair dryer
Feugsy
20
Years of Service
User Offline
Joined: 1st Nov 2004
Location: Australia
Posted: 2nd Dec 2004 18:32
sorry i dont have my code at the moment the only thing is that it only checks for the first object collision
if that is colliding it checks for the next and etc

sorry ill try get my code
\
cheers for this

darkhorsegames.tk coming soon
Feugsy
20
Years of Service
User Offline
Joined: 1st Nov 2004
Location: Australia
Posted: 3rd Dec 2004 16:16


i hope this helps

ps if anyone can be bothered lookiing through this code it is a basic fps engine and is worth a look if you want to

cheers if this helps

me

darkhorsegames.tk coming soon
Feugsy
20
Years of Service
User Offline
Joined: 1st Nov 2004
Location: Australia
Posted: 4th Dec 2004 09:30
oh yeah sorry for the massive code but i figure the only way to do something is to do something right. if it helps the object collision only checks for the first object collision and then checks for the next one down the order once the first is colliding and etc. thsi si a real problem and i cannot make a decent game witihout fixing it. i really hope this helps and if anybody cant help or asks for soemthing else then i can give other variations of my code that i have made.

cheers anyway

me

darkhorsegames.tk coming soon

Login to post a reply

Server time is: 2024-11-27 16:32:39
Your offset time is: 2024-11-27 16:32:39