So anyway, I was reading the game engine on the blender wiki (summer of code) and I started playing around with it. A basic question that wasn’t covered: how would I set up the camera to move around like it would in a normal FPS game? I haven’t been able to figure it out. ???
Scabootsca wrote a nice easy to use FPS Script:
http://www.freewebs.com/scabootssca/ and then go to files.
Thank you very much.
Not to narc on scaboots work here, but there are still some unresolved problems with his setup there.
I recommend you use this setup for now, made specifically for use with bullet:
You’re possibly going to have to update that tutorial after this next release Social.
nice script, but is it possible to eliminate having to click the mouse to aim?
problems? what where… mabye most of thise files were from 2.34 i dunno
Yes, in the “aim” script, change if click.isPositive() and player.init == 0: to just if player.init == 0:
Get rid of the whole elif block after that.
In your walkabout demo, the “friction shake bug” is still present (for more info on that visit the thread for my setup, I explain the details of that bug there) and for some reason the player body starts to spin on it’s own, when the player makes contact with the walls a certain way.
ahh that… i dont care about that it will be fixed soon in blender just use socials
Thanks! that dit the trick…
Hmm… I have this level in my game where Ive added a elevator. The elevator works just fine and all that, But when I drive up with it, my mouselook bums and gets totally messed up:(. It did that with yours also, Social. AND If I look down or up it bubs too.
I can show you a movie if you dont understand…
Its a great script social, except for one thing. The player seems to fall down really slow if you walk him into a direction when falling. can you fix that please?
Sounds like a physics problem. Did you ever think about moving the level instead of the elevator itself (that way the elevator is stationary all the way through)?
I think that would solve your problem here.
Add a collision sensor to the viewer object, name it “onGround” no quotes, connect it to the walk.py python controller.
In the walk.py script, assign the sensor with onGround = cont.getSensor(“onGround”), and that should be placed with all the other sensor assigment’s at the top of the script.
At the very end of the walk.py script, modify the else block to look like this:
else: vec = VEC_normalize(vec) vel = VEC_mul(speed, vec) floormove.setLinearVelocity(vel, vel, vel, 0) if onGround.isPositive() or player.flymode: GameLogic.addActiveActuator(floormove, 1) else: GameLogic.addActiveActuator(floormove, 0)