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 / Was doing SO well on smooth movement, but now I'm stumped :(

Author
Message
Qqite
16
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 28th Dec 2010 08:14
I was on a roll, but now I'm having a problem of the player forcing himself through walls. I am working on making a smooth movement system. I am using SC collision and the variables plrSpeedR# for right movement (negative for left movement) and plrSpeedF# for forward speed (negative for backwards movement).

My problems are that the player can force through walls and that the left and right movement is terribly wrong, even though everything seems to be set up correctly :\

Notice: this is the beginning on my move player function (yes I have variables on global xD) and is NOT RUNNABLE by itself. Souly for reading. If you want a full test I can provide full download.



Ventures of the worlds around us are only limited by imagination.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 28th Dec 2010 09:13
This bit is wrong, you aren't resetting plrSpeedR#


change it to this:


try adding in code again:


before this line:


and take this line out:


Re-written:


Hope that helps!

Login to post a reply

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