Code archives/3D Graphics - Misc/First person perspective movement & mouselooking code
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
*** Blitz3D Code *** First person perspective movement and mouselooking code. The code is heavily commented, so just grab it and go for it. Note that movement, jumping, fake gravity, etc is not that convincing. Doing all that in a convincing manner is a much more involved process and this code is just designed to be a starting point. EDITS:- Added code to show a gun using a second camera. Added a crosshair. Updated mouselooking and movement code. Converted to render tweening. Added a graphics resolution selector. Added jumping, sprinting, configurable strafe speed, and fake gravity. | |||||
The code is at: http://www.blitzbasic.com/codearcs/codearcs.php?code=1137 |
Comments
| ||
Fantastic! Good work! |
| ||
Needs dampening |
| ||
Nice, but its not finished :( i can't jump, and not run, and i can walk up to over 90' hills if not more. But hey, what has be done is great. Its a great start!!! I hope to work this out a bit more. |
| ||
I've updated this a bit since I wrote the original code 10 years ago. The following things have been changed. EDITS:- Added code to show a gun using a second camera. Added a crosshair. Updated mouselooking and movement code. Converted to render tweening. Added a graphics resolution selector. Added jumping, sprinting, configurable strafe speed, and fake gravity. |
Code Archives Forum