If you are a Blender Game Engine (BGE) enthusiast, you may have noticed in the past releases the inclusion of the new Look mode in the “Mouse Actuator“. This new mode is going to be really useful if you are new to python coding and need a way to create your own FPS template,just like the classic Quake or DOOM camera style template without code, just by linking some logic bricks.
Watching closely the actuator
This are the options and setting for the Mouse actuator with the “Look” mode active, you can find some info of it as a tooltip on each button in blender, I think they are very intuitive but it worth the deep study of it.
As shown in the image above, this button will register mouse movement in the “X” axis of the screen, since the screen is a 2D area that represents 3D objects, and it has “X” axis and “Y” axis only. And with this we only get “X” axis movements.
The more value in Sensitivity will make react really fast with short mouse movements. I tried this with “5”, and it was really sensitive. With “0.1” value it behave so slow, it barely moves
This offer some kind of “delay” to the initial movement.
Here we select in which axis we will apply the movement, for example if this is for a FPS, by registering the X movement (to turn around, or to perform side to side look) we should apply this in the Z axis.
Usually in FPS templates you can turn arround more than 360 degrees without restrictions, just like in real life, so if that is what you need, keep default values. But if you want to make a side scroller and the player should not be allowed to aim in their back, then use this.
For the Y axis button there are default values (90 and -90 degrees) to avoid unreal camera movements .
And the same applies here, but in this case is for the “Y” axis, and in a FPS template will calculate up and down movements which will be used to perform up and down camera movements.
Testing with a project
So everything went fine till now, we got in a few steps our very first FPS camera control, with no need to code, wich is really good for a lot of people who does not want to include a more elaborated one (maybe with more features, like crouch, swim, etc) therefore this new actuator is going to be really handy for a lot of people, and besides everything, we have got tools, the last thing we can do is use it.
So I decided to go further when I was testing, that’s why you saw in the past weeks some post series about it (fps shooter demo and fake god rays ), at that point I I had my FPS template, so.. why not make a small level? So I make the test level, added some sounds, a weapon (from an older blender game project) but still looking a bit dull, so I came up with the idea to include some 2dfilters, and some billboards to simulate fog.
And at this point I notice some weird behavior with the FPS template, the camera movement started to feel a bit unresponsive, and my first thought was about the extensive use of billboards (I did not use alpha textures, but use “add” option to simulate transparency), but this didn’t change the “step-like” movement when I reduce the billboard count.
It was kind of confusing, so I ended up disabling shadows and nodes in the “Shading” panel and some other settings in the “Display” panel to figure out what happens.
But it didn’t work, I got some extra fps more (before that, it was 57-55 fps approx), but the strange unresponsive movement remained. So I did a comparison, by using the same geometry (level) and two different FPS templates (Python and Mouse actuator), because obviously with 60 fps it should work smoothly! And the result was as follow:
As shown in the video above, it seem to be that the mouse actuator has some issues, or maybe its just a matter of modify some settings in the actuator, but at this moment I cannot find out the solution or the correct settings (if any), maybe is a bug or a glitch? I don’t know right now.
- Really easy to use
- Suitable for various types of camera templates
- Seem to be unresponsive working on full screen
Not quite usable right now, this need some revision to fix that problem, otherwise I do not recommend to use it at this time to create your camera setup (FPS, side scroller or another). You better wait a little bit more, maybe it will be fixed in the next release.
And yes, after some research I found that the issue is a bug, so maybe someone is working on it.