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 / How to slow movement of player with sparky's collision code

Author
Message
Mr Bigglesworth
18
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 25th Dec 2010 01:43
I am using sparky's collision code for a first person persective collsion. It works great but I need help with slowing down movement of the player. I tried messing with the "position object 2, x#, oldy#, z#" and the "if keystate(32)=1 then vx# = vx# + cos(angy#)" stuff, but it just screws up collsion and placment of the player. Any help on slowing down movement speed would be greatly appreciated.

BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 25th Dec 2010 20:58 Edited at: 25th Dec 2010 20:59
It REALLY is a good idea to provide compilable sample code for us to test.
So I added to your program to get a compilable program, and this seems to work.

What about setting up a speed# variable to adjust the objects speed, such as this
Mr Bigglesworth
18
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 25th Dec 2010 22:40
Aww, thank you, it works great, merrys christmas

Login to post a reply

Server time is: 2026-07-21 20:35:28
Your offset time is: 2026-07-21 20:35:28