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.

DarkBASIC Discussion / 3d collision

Author
Message
Zach
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: Ms, USA
Posted: 3rd Mar 2003 00:53
If there's one thing that i cant do in darkbasic its 3d collision...I do it like some of the examples do but it still don't work. this isn't all of the code ...


sync on
set global collision on
do
oldx=x
oldz=z
if object collision (1,2) then x=oldx:z=oldz
sync
loop


help!!
my project is useless if i don't get this to working..
Tupelo, Ms
sorcre
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: United States
Posted: 3rd Mar 2003 00:58
i do not knowt he 1st step in collicion how do i make a simple stop collicion?

never achive your goals... cause if you do then what is next????
MobilisNemo
22
Years of Service
User Offline
Joined: 31st Dec 2002
Location: - Please Select -
Posted: 4th Mar 2003 00:24
Try adding "set object collision to boxes (object number)"

Check out my demo:

http://www.geocities.com/mobilisnemo/JumpShadowDEMO.zip
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 4th Mar 2003 01:13
your demo doesnt work... the linked site says 'page not available'...
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 4th Mar 2003 03:07
OK what your going to have to do is make collision boxes for each object, using the objects size and such. Then you can check for object collision, and then store variables like oldx# and stuff taken right at the point where collision happens. Then position your object at those coords.

A work around for only having to do this once is like this (but kinda slow, cuz its checking for collision every loop)

OK object 0 is your object, and there are 10 other objects (1-10)

FOR x=1 to 10
if object collision(0,x)=1
(store your object variables and do collision)
endif
next x

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Zach
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: Ms, USA
Posted: 5th Mar 2003 00:57
Alright I'll try...I use to know how to do this but its been a while and my mind just went blank....

Tupelo, Ms

Login to post a reply

Server time is: 2025-08-08 20:40:09
Your offset time is: 2025-08-08 20:40:09