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 Professional Discussion / Collision won't work for some strange reason :'(

Author
Message
Flamertor
14
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 16th Sep 2012 01:53
Hi,

Well Im making a game which alot of you might of heard about called the scrolls of eithador the great war Theres one slight problem I can't get collision working! I treid everything and the most effective way I think will work is this (treid everything else)



but for some strange reason it won't work

Hope you can help

P.s thanks in advance

Go to my website http://imthegamerunner.moonfruit.com
Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 16th Sep 2012 03:38 Edited at: 16th Sep 2012 04:09
for starters, and depending on your camera movement rate and technique, there's a chance that the camera's z coord is never exactly -375 as you're checking for in the code provided.

did you mean to check if it's less-than or equal to, instead? ie,



?

see this "fly over" demo for the "collision" effect i think you're trying to achieve:


Virtual Nomad @ California, USA . DBPro V7.7
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 16th Sep 2012 09:57
you better try the Sparky Collision plugin.
its the best fit for your game.

Advanced Updater for your games!
Flamertor
14
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 16th Sep 2012 10:16 Edited at: 16th Sep 2012 10:22
hi Sergey

yea I know but it dosn't work ob the laptop im using


Edit: For some reason now it is working I think

Go to my website http://imthegamerunner.moonfruit.com

Login to post a reply

Server time is: 2026-07-07 12:27:29
Your offset time is: 2026-07-07 12:27:29