Forum

how to have 1st person controls with mouse for camera look?

09 February 2015 03:56 #1322
@JPfeP

You have to have the modified pointerlock.js module called (or required) from your main js file.
Look something like this:
var m_plock = require("pointerlock");

as well as link that module (script) to your html file:
<script type="text/javascript" src="pointerlock.js"></script>

Hope that helps :)
09 February 2015 05:30 #1323
To build on this topic further, I've been playing with fps controls using the Pyatigor's Tale demo, trying to get more typical fps controls working.

I've so far go strafing and diagonal movement down, but strangely, when i, for example, push down the forward and left keys at the same time, as soon as I key_up, movement stops all together. I'm pretty sure the issue is in switch case statement, but I don't know.

I attached folder in case anyone wants to play with it.

Also the devs are gonna publish a tutorial on fps control soon anyway, so I'm not worried about this.
09 February 2015 10:30 #1324
ou have to have the modified pointerlock.js module called (or required) from your main js file.
Need to mention that from 15.01 pointerlock.js addon is replaced by mouse.js addon. It is the one to control pointer lock now.

I attached folder in case anyone wants to play with it.
Looked through it. Nice controls. But logic can be a little more straightforward. We'll publish a short tutorial on a Firstperson this week. It'll describe controls and physics setup for environment. So I hope it'll cover the most of your needs.
Blend4Web developer
10 February 2015 06:12 #1337

Ответ на сообщение пользователя Evgeny Rodygin
Looked through it. Nice controls. But logic can be a little more straightforward. We'll publish a short tutorial on a Firstperson this week. It'll describe controls and physics setup for environment. So I hope it'll cover the most of your needs.

Very Cool, looking forward to it.
 
Please register or log in to leave a reply.