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 / Collision Problem

Author
Message
Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 15th Jan 2008 20:34
Well in the screenshot I provided you can clearly see the objects colliding, but when they collide the program is suppose to end, well it doesn't do a thing. Any help?




Formerely Cool Guy Jordan

Attachments

Login to view attachments
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 15th Jan 2008 20:47
The picture isn't really zoomed in enough to see is there is any collision, but perhaps the object hit() expression (same parameters) might work for you...

Unfortunately, the built in collision functions are not brilliant...

ALternatively, try switching the 3 and the 4 around. That shouldn't fix anything, but some odd quirks exist in everything.
Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 15th Jan 2008 23:31
Doesn't work.


Formerely Cool Guy Jordan
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 16th Jan 2008 00:10
How are we supposed to help when you give so little information?

For example, with just that single line of code, there's no context so we don't even know if that line is even being executed in your program!

We also don't know if either of those objects actually are number 3 or 4!

Try to be a bit more descriptive - we aren't psychic you know!

TDK_Man

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Jan 2008 17:54
OK. The object 3 is probably the dog(or what ever it is) and object 4 is the cube it`s standing on/in.

If so, try putting a collision box around the objects:



If you use the command object collision() you will need to make a collision box for it to detect if two collision boxes are overlapping.

TheComet

Oooooops!!! I accidentally formated drive c.

Login to post a reply

Server time is: 2025-06-02 10:02:56
Your offset time is: 2025-06-02 10:02:56