Cool script, but how can I start and stop the script ingame?
The simple way is to add a Boolean property to the object using the mouselook script, and name it āenableā. True = Script is on; False = Script is off.
Thatās strange. I just tested it out in a new blend file, and it worked as expected. Iām not sure what the problem is for you.
Hi, i just tested it, and im only able to move left or right, but am unable to lower or raise my aimā¦ could you help me out, please?
Awesome script, just tested it and everything works perfectly
BUT after jumping you canāt change direction or speed of your movement.
if I understood right it is supposed to be like this?
is there any way to let you control your flying after jumping?
ps. Iām not familiar with python, but any advice will be appreciated!
thanks for the great script anyway!
@gniorg: Could you post a .blend file with the problem?
@jarkko: The movement is meant to be more realistic like that, yes. You can add a boolean property named āDFLYā to the mouselook object, and then set it to True. This enables fly mode, which mean you can jump and move without touching the ground. Iām not sure if thatās what you want though.
no, I mean after you jump (in dynamic movement mode, without flying mode), you canāt control yourself until you hit the ground again, In most most games you can change your way or slower your speed in the air. I know itās not realistic but thatās what I need, Thanks
Ah, I see. Iām working on a new update for the script, so Iāll add this to my to-do list for the movement system. For now, you could perhaps just set up your own movement system out of logic bricks, using servo motion actuators. Theyāre good for limiting velocity to prevent the object from sliding.
If you could make this script for 2.64 and make it so I can use the Character physics instead of Dynamic, I would love you forever
The Mouselook function itself should work fine in 2.64. The Character physics type uses location instead of dynamic motion (force and velocity), so I will need to write up some new code for that. It might be a while, but Iāll add it to my todo list.
In the mean time, you could probably make your own movement system with logic bricks, using loc values to move the player around.
Yes but that would mean I would have to lose my ability to start and stop the character when I absolutely need to, and I do a LOT of the time in my game ._.
Riyuzakisan this is a great tool thank you for all the hard work you put in to this one. i was wondering how would you go about adding the ability to lean when crouched or standing and rolling when prone?
Thanks. That sounds like something that would be on a rigged fps character, with an armature and animations. The physical bounds of the player also need to be scaled down when crouching, to fit under smaller spaces. Iām not sure how that could be done by just the script.
As a side note, the movement systems in this script are just meant for quickly being able to demo a scene. Iād imagine an actual first person shooter game would need to invent its own more complex movement system, with features like those that you mentioned.
Hi, i seem to be missing something, the script works like a charm, if only for the fact that sprinting and crouching doesnt work, do i need the collision and ray sensors for that? and that leads to my next question:
Ground Detection: For detecting ground collision for proper jumping mechanics, a Collision and Ray sensor can be added to the Dynamic object and connected to the Python controller on the Mouselook object.
how can i connect a sensor of one object to a controller that resides on another object? or do i just make a controller with mouselook script on the ācharacterā object aswell?
Iāll address your second question first, about the ground detection. Youāll need to select the player object first (the one with the collision and ray sensors), and then Shift + Select the Camera (mouselook object). Selecting them in the opposite order would work just the same. The Logic Editor should now show the logic bricks from both objects, so you can cross-connect them.
I started out from scratch to set up the mouselook script, and found that without the collision and ray sensors, sprinting and slow-walking (ctrl) donāt work for some reason. I donāt remember if this was something I did on purpose or not, but Iāll keep it in mind for the next update. In this version, youāll need the collision and ray sensors for sprinting and slow walking to work. I also noticed that sprinting doesnāt offer much of a speed boost (also something Iāll keep in mind).
Iāll also rename ācrouchā to just āwalkā or āsneakā in the documentation in the next update - itās a bit deceptive since the player canāt actually crouch down lower
thanks Riyuzakisan i will attempt to animate a lean and see if i can bind it to a key, thinking pulse should do the trick.
Is that possible to add a hand or something, what could pick up a object from ground? Like in Half-life?
Itās possible, but itās something youāll have to do on your own
Iām only distributing a script here.
i need some help with this, i thought i did everything the way you did, but my characters movement is somehow messed up. it goes like this
(A=Backwards, D=forwards, W=Left, and S= Right.) any idea as to how to fix that? thanks a lot