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 / Help with collision and speed

Author
Message
Wii are here
17
Years of Service
User Offline
Joined: 23rd Jan 2007
Location:
Posted: 2nd Feb 2007 18:04
I'm trying to get a whole bunch of cubes for me to collide with but it's not working. Also the speed (which is set to the same as backwards speed) forwards is incredibly faster than the backwards speed. Please help.
Wii are here
17
Years of Service
User Offline
Joined: 23rd Jan 2007
Location:
Posted: 2nd Feb 2007 18:16
sorry

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 3rd Feb 2007 00:27 Edited at: 3rd Feb 2007 00:28
>nevermind> looking at code now.


:: Check out the new FPS Tutorial's Progress at http://www.freewebs.com/ruccus
along with code, media, and more.
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 4th Feb 2007 03:31
For the purpose of keeping this simple I have left some errors in your program for you to fix. The reason it was going faster forwards was because you had the movement code in a for loop so it could happen multiple times with one game loop.

Here I corrected that problem-


The problems that remain are:
-you can move backwards through things
-once you collide with something you can't get away from it by turning around and using the upkey

To solve the first one just do the same thing for the downkey which has been done for the upkey.
For the second one you can just make it automatically move you back to a previous position not colliding with the object.

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 4th Feb 2007 21:35 Edited at: 4th Feb 2007 21:35
try TDK's collision tutorial

http://forum.thegamecreators.com/?m=forum_view&t=96045&b=7

~Kieran

Login to post a reply

Server time is: 2024-09-25 17:29:20
Your offset time is: 2024-09-25 17:29:20