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 / need help w/player and camera movement

Author
Message
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 27th Nov 2007 20:45
i am working on a fps game which is going good except for the movement..when moving with the arrow keys and turning around with the mouse the player gets stuck and moves backwards when pushing the forward arrow..pushing the left or right arrow buttons move him at an angle...i am still learning so i know it is something in the code...here is the code...


thanks, pirate
vorconan
17
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 27th Nov 2007 22:46 Edited at: 27th Nov 2007 22:57
I've wrote a quick example program with all the movement code you need here, hope it helps :



Cheers

EDIT - A little bit updated, limits the amount you can look up and down, and some fog, just because I felt like it really.





pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 28th Nov 2007 10:42
thanks vorconan,
i appreciate you taking the time to help me out with this..i have made a few games with all keyboard movement but this is my first using the mouse to look around and shoot in any direction..i'm working long hours right now but i will try your code as soon as i get a chance...thanks again, pirate

thanks, pirate
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 4th Dec 2007 12:10
hi
Nintendo Zelder3D,Mario3D style,
third person viewpoint movement.

I want a method to work smoothly.

This is a sample program.
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 4th Dec 2007 21:06
this is great movement code pcraider, thanks for sharing....i could not get vorconan's code to work properly with the rest of my code but i have managed to get the problem solved..i will save both examples for later use...thanks again...

thanks, pirate
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 5th Dec 2007 00:40 Edited at: 5th Dec 2007 00:44
heres an example. it's just basic stuff from my fps.

so you know, limb 13 is the player's head.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-09-27 08:28:50
Your offset time is: 2024-09-27 08:28:50