FPS Mouselook Demo

Description

Demo level by Chris Plush of CG Masters featuring an easy to use mouselook script for FPS camera movements. The script includes a rotation limit so the camera stops when you're looking straight up and straight down. You can find a tutorial on the script at [http://www.cgmasters.net/free-tutorials/fps-mouselook-script-plus-real-text/](http://www.cgmasters.net/free-tutorials/fps-mouselook-script-plus-real-text/)

__Updated Aug 8, 2014:__ Fixed a fullscreen issue where if the cursor moves fast enough and goes out of the camera bounds it no longer registers mouse movement(which runs the script) so no longer controls the camera. I simply added an always sensor to always run the script.

Comments (24)

B
Bananaboy almost 12 years ago

Wow this is realy great! Can I ask you how I can make high resolution textures without loosing too much performance? Even if I make a litle szene it lags very hard and I dont know why... :( And somtimes there are everywhere aberrations and the screen flickers between black and the normal view ....

C
CGMasters almost 12 years ago

Sounds like a system performance issue to me. Although I'm not a hardware guru, I think generally a good graphics card plus more RAM will do the trick in running scenes faster. What are your system specs? It's also possible that all you need is to download the most current drivers for your graphics card to boost performance. For general tips on texture performance though, I don't make any textures bigger than they need to be(I generally stay around the 1024x1024 size), and I make use of tiling textures instead of creating giant textures for a large area.

B
Bananaboy almost 12 years ago

Ok thank you. your szene runs very fluid with my system and it looks much better than some szen of others! This is the reason I ask :D I try to download new version of my drivers maby it helps :) I blender with my Asus laptop (yes a laptop :D) i5,2,8 GHz,Amd readon 7610M and 4Gb ram.

C
CGMasters almost 12 years ago

That seems strange then that you're having low frame rate issues, your systems pretty good. If you want, you can send me a blend file with a scene you made that runs slow for you. I could look it over and figure out why it's lagging and where we can optimize things for better performance. My email is contact@cgmasters.net.

E
ElBarto19 almost 12 years ago

Verry Nice !!!! <3

P
peacemaker1011 almost 12 years ago

awesome man!!!!!!!

J
JDHaller almost 12 years ago

This is so cool Thank for sharing and all the tips!! :) Will be looking at the tutorials. Thanks again!

T
Thsd1 over 11 years ago

oh my god so freaking awesome! if you let me use this and turn it into a game i promise i will give the fullest extent of credit i could possibly give!

C
CGMasters over 11 years ago

Of course you can use this! It's released under CC 3.0 Attribution, meaning you can use it or even modify it however you want and for whatever you want, as long as you credit "Chris Plush at cgmasters.net" as the author. -Chris

M
Misheck over 11 years ago

Is there a tutorial somewhere on how you made this scene ?

C
CGMasters over 11 years ago

A lot of the models and textures were created in an old training course of mine that's no longer available but I am working on a new game modeling and texturing course that should be out in about 2 months. -Chris

A
altcare over 11 years ago

How can you add jump?

C
CGMasters almost 11 years ago

An easy way would be to give the ground a game property called "ground", and on the dynamic actor add logic bricks to detect if its colliding with the ground property AND the keyboard jump button is pressed, then connect it to a motion actuator with vertical force. I think some options have been added for jump but I actually haven't played much with the game engine in years, I'm unfortunately out of touch with any developments at this point so search around youtube for recent bge tutorials. -Chris

P
pawel almost 11 years ago

How do you actually run it? If I just do "Start Game Engine", there's a lot of flickering around the edges and I can only move, but the mouse doesn't work.

C
CGMasters almost 11 years ago

It might be a version conflict as this was tested in 2.71. Not sure how that would create flickering though, that sounds like more of a hardware issue though I'm not really sure. The mouse not working is probably due to scripts needing the line "import bge" at the top of them in the latest blender versions. There's also a new mouselook actuator which partially outdates some of the mouselook script in this blend. -Chris

C
CastleBuilder3d almost 10 years ago

Added the "Import bge" script to the top. Works fine. Had to scale it down a bit (and reduce the walk speed a bit) as the camera is about 8' up (buildings are about 75' tall). Other than the weird scale issue which is oddly common...why not real world scale stuff? Very nice. Thanks.

C
CGMasters almost 10 years ago

Hmm, maybe I'm missing something. The scene uses the scale 1 blender unit = 1 foot and in that sense everything is scaled realistically(20ft building minus the roof, 5ft camera level, 3ft barrel, etc). Are you asking why I didn't set the measurement to imperial or metric in the scene properties? If that's the case then there's no real answer to that. -Chris

V
visualizer2015 almost 10 years ago

hey I just checked this file everything is fine but mouse doesn't work at all! i m using 2.77 version. Is there any fix ? CastleBuilder3d said something to add but I dnt know where and how. I m not programmer. any help?

C
CGMasters almost 10 years ago

Open up the text editor window in Blender. Then from the header load in the mouselook.py script, scroll to the top and paste "import bge" without the quotes at the top. This should fix things. However this script is outdated now that there's a mouselook actuator in more recent versions of Blender. -Chris

V
visualizer2015 almost 10 years ago

Bingo! It worked very well...! Thx. for this tip ! :D however just a query, how do I make jumping & climbing. is there any script which can be added to this?

C
CGMasters almost 10 years ago

Sorry I'm not sure what the best ways are to do this anymore, it's been a long time since I've done any real bge game functionality. -Chris

M
mervsky21 over 8 years ago

This FPS Demo is great. :) Liked. Great textures by the way.

B
bimalhessa about 8 years ago

The scene looks awesome.Thanks for sharing

G
GLITCHΞD 5 months ago

nice job.

Sign in to leave a comment.