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 / Side strafing

Author
Message
lcfcfan
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 3rd Sep 2004 00:50
Can someone tell me why this code does not work? I'm making an fps and want the camera to strafe left and right using the left and right keys. The code below is not my actual code but thats the code i tried to use to make it do that.
Xander
21
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 3rd Sep 2004 03:32
The code doesn't work because it moves the player only in the x direction. When strafing, the player actually moves in both x and z directions, based on his y angle. Here is some code for strafing:



That should get you somewhere...

Xander Moser of Bolt Software
Firewall: Your Computer's First Defense - Real Time Strategy game
[href][/href]
McChief
20
Years of Service
User Offline
Joined: 24th Mar 2004
Location: USA
Posted: 4th Sep 2004 05:29
Walaber showed me the following code to get my camera to strafe. Works perfectly. Hope that helps too...
lcfcfan
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 4th Sep 2004 06:21
cheers guys will try your code out.

Login to post a reply

Server time is: 2024-11-27 08:49:22
Your offset time is: 2024-11-27 08:49:22