How to make simple collision?

23 December 2016 19:18
Dear Blend4web team!
I like this application very much. I would like to prepare a labyrinth fps in a style. How is it necessary to turn up in order for the camera not to go through the wall?
Could I ask a plain example? Somebody would repair it the .blend file? link - Thank you!
Excuse me for the modest English knowledge Hungary Blender Community Site
25 December 2016 12:23
Hi stewet and welcome to the forum!

To create an FPS-like game you'll need a special object called character. Please have a look at our firstperson demo (blender/tutorials/firstperson/firstperson.blend in the SDK) and this tutorial.
26 December 2016 01:08
Thank you for the answer Alexander!
I looked at it the tutorialt, I was looking for this. But I have need the mouse onto an indicator. I prepare an application where the player finds tasks in the labyrinth. (a whirl clicks on a question mark)
The questions:
1. How is it possible to make the cursor visible?
2. How onto a constant usage which can be prepared (for instance) default.js file? Only the json file translation not enough, I know this.
3. The touch of the object works on a mobile phone with a rap if the cursor is not visible??
I say thank you for everything Hungary Blender Community Site
29 December 2016 15:28

1. By default, the FPS controls module will use browser's pointer-lock feature. To disable it, just return false from the check_pointerlock() method inside the addons/fps.js module.
2. You can create additional module for your constants and connect it in your app's HTML file as usual.
3. FPS controls module works fine on mobile devices too.
30 December 2016 21:40
Thank you very much Alexander!
Everything works already so.
I have two questions:
1. How (where?) it is possible to claim the velocity of the motion? If Walk is Speed: 1.00 - then too fast the motion.
2. Why the camera moves (with mouse) in that direction vertically where is watching?
(And I wish all of the team a happy new year)
File Download Hungary Blender Community Site
04 January 2017 20:47
Dear developers!
I solved the problem. Disable fly mode with c key. But…

Where can be set the default? ( walk-mode => apply default - without C Key)

Greet the answer and thanks for everything Hungary Blender Community Site
05 January 2017 17:26
method inside your code provides basic character controls. However, if you need something better you might check out the newer preferred way to control characters - i.e. the
However, I think I understand your problem now. You are using somewhat outdated version of our engine - 16.01 (this version doesn't include FPS module). So I think you can easily solve this by updating and replacing one method by another.
06 January 2017 12:23
Hi Alexander

Thank you for the answer

The taller version demands a bigger resource unfortunately, but i think will be worthy to refresh

DEMO - walk mode => CKey (else fly mode) Hungary Blender Community Site
07 January 2017 19:42

Nice demo you made!

Reply to post of user stewet
The taller version demands a bigger resource unfortunately, but i think will be worthy to refresh
That's should not be happening because we're trying to optimize performance from version to version, not worsen it .
08 January 2017 13:37
hi Alexander
I installed it the 16.12.1 version. The project managerrel I created the files. I appended the objects to it. (from old file - simple_maze.blend) Pasted it fps code.

- The pointer disappears unfortunately
- The camera goes through the wall
- I don't know how it is possible to publish everything
(the list of definitive files)
Please help me!
Source files download and local path: /home/stewet/blend4web_ce/projects
Comment: portraying the mouse pointer (cursor) so would be good! (see it picture)

Show Mouse in Blender Game Engine

Excuse me
The collision I solved a problem - Margin = 0.001 (see it picture)
Physics Panel - Collision Bounds - Margin
But I cannot solve the mouse pointer (cursor) visibility and the full project publishing Hungary Blender Community Site
Please register or log in to leave a reply.