Forum

Camera configuration

26 June 2016 19:36
Hello, I'm new to blend4web.

I have the system running, I can export my scene from blender and access it through the web browser.

I'm trying to configure the camera movement in order to follow the mouse and the keyboard buttons. The idea is to move the camera as a first person game. I have an object that is my "character", the camera should follow him.

In the "game engine" mode it works without problem, but when I try to configure it and export it with blend4web then it doesn't work.

I've been trying to follow the tutorial of the SDK "making_a_game_p1-3", but here the approach is different, apparently you have to program additional javascript files in order to configure the settings.

So, could someone try to help me to see how to work properly and control my animation features. Thanks!
27 June 2016 09:46
Hello and welcome to the forum.

Take a look please at this article. It's easier then "making_a_game_p1-3"
27 June 2016 13:45
Hello Roman, thank you. That code was easier to follow.

I have a question: I had to locate the camera behind my character using the javascript code:

m_cons.append_stiff_trans(camobj, character, [0, 3, -5]);

Is it possible to do it with blender?

I mean, how do I know what can I define in blender and what must be define with javascript?
27 June 2016 16:42

I mean, how do I know what can I define in blender and what must be define with javascript?

I think, the application logic and interaction of objects should be written by JS. Visualization and physics parts should be set in Blender.
 
Please register or log in to leave a reply.