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 help needed

Author
Message
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 31st Aug 2003 15:31 Edited at: 31st Aug 2003 23:34
when I loaded a player model in my FPS game and i wanted to detect collision with a box, I used the following code:



the prob is that when the box hits the player is says nothing but when i make antother box and the boxes hit each other is does says hithithit. whats the prob here?
p.s:object 10 was made with "make object box".
EDIT:
i'm using the alien model from the compo

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 1st Sep 2003 07:49
use a for / next loop on your collision to get all the world objects to use the same collision code.


EG your player is object 1 and 10 monsters are 10 -20

for i = 10 to 20
if object collision(1,i)>0
Print "HITHITHITHITHIT!!!"
endif
nexti


later on explore the distance formula and you can reduce the slowdown caused by too big a loop of collision checks made in each main game loop in this regard.

http://www.lunarpixel.com
It's already tomorrow in Australia
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 1st Sep 2003 17:58
I was told there was something wrong with the alien model and that more people had this problem

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 2nd Sep 2003 22:32
anyone know what's the prob?

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram

Login to post a reply

Server time is: 2024-09-20 21:28:38
Your offset time is: 2024-09-20 21:28:38