================================ Project Discontinued
As of January 2015, this project has been discontinued.
The latest version of the script has been posted on GitHub, and is released under public domain, so feel free to modify and distribute it as you see fit. I currently have no plans to continue development on this project.
MouseMove - A Mouselook & Movement Script
Version: 2.7
Released: March 19th, 2013
Made with [Blender](http://www.blender.org/) 2.66.1 (<i>r55075:55077</i>)
This script is designed to be quick to set up and easy to customize, and offers a Mouselook system and two optional Player movement features.
<i><b>Features included in this script:</b></i>
Mouselook system
Two player movement systems (Static and Dynamic)
Property Hooks - Easily customize how the script works by using Object Properties; No programming required!
Import, run, and change properties from inside your own script!
Updated the files, the movement functions require a keyboard: all keys (true pulse) sensor for now. I removed the requirement of the always sensor, so it only activates the code on direct input.
Hi Riyuzakisan,
thanks for this script, it works well, but when I tried to replicate your scene from a scratch the dynamic box does not move correctly. It moves shortly, only when I press forward button or continuously only when mouse is moving in the same time. Please, could you have a look what can be wrong? here is the blend
thanks,
f
Just make sure you enable True Pulse for the keyboard sensor. This goes for both the Force and Loc movement (it’s listed in the instructions in those sections of the script)
True Pulse will send a pulse to the controller depending on the frequency (which in this case should be left at default: 0 ). If true pulse isn’t enabled and you press a keyboard key, it just sends the initial positive pulse followed by the negative pulse when you release the key. True pulse mode keeps the positive pulses constantly flowing as long as the sensor is active.
In your file, the reason it moves when you move your mouse is because once you hold the key down and it sends its single pulse to the controller, the mouse sensor which is also connected to that controller sends its own pulses to run the script, which finds that the key is being pressed.
Oh and by the way, you might consider reorienting your camera so it’s facing the forward direction of your player cube, it seems a bit off
I should also add that, unless you’re testing the Mouselook property configuration or planning on changing those properties in game, you don’t need to add properties such as Enable, Cursor, or Invert and leave them all to their default settings. The defaults are defined in the script in case the properties aren’t added to the camera. Just noticed you had added those, not sure if you were testing them out or not
Thanks a lot, it helped, I am very new in BGE, bought the environment tutorial from cgmasters and now making first tests, trying to add movement camera. And yeah after purely copied your scene (except the true pulse) I realized I dont need property config!
cheers,
F
Here’s a minor update (v2.1)
I noticed that the camera would somehow start slightly rotating on its local Y axis and causing an awkward tilted view, so I’ve limited that from happening. Download link updated in the original post.
You need to be using the Game Engine (logic bricks), not the Run Script button. See the picture in my first post that shows the minimal logic brick setup.
Your demo file works well, but when I make an own file with your script and move the mouse the camera turns upside down. I used the minimal configuration
Thanks