Forum

create obstacle character cannot walk through

18 May 2017 00:26
I have a character walking around

http://www.trepaning.com/croissEyes

It was made to walk by copying and pasting the Gamepad code into the JS file and changing the relevant names.

Character walks fine via WASD controls, but I assume it would not walk up hills or anything, just along X and Y (assuming Z up) and ignore all collisions along the way.

How to I create or adjust the character so it will not walk through a cube?

What settings are needed for the cube? (already in other thread, may as well put it in this thread also)
18 May 2017 00:27
Regarding the Cube settings

Reply to post of user Roman Sementsov
Hello
These objects are named collision objects, you can enabled the static physics type and select a collision shape for them.


But if you want to use a mesh surface as collision shape, you should enable the Special: Collision property for object's material. This objects will have static physics type. We always use this way for a terrain collision and etc
18 May 2017 10:31
It was made to walk by copying and pasting the Gamepad code into the JS file and changing the relevant names.

This tutorial doesn't use physics. To enable collisions, you have to modify it. By first add character object and enable character settings on the physics property panel in Blender. Then add this object to the armature as a parent.
How to control the character, you can find in Firstperson demo in the SDK

I can prepare an example this weekend
Blend4Web developer
18 May 2017 23:54
Thank you Roman (and all B4W people) I look forward to the information.
21 May 2017 15:16
Hello
I've attached the example. Import it to your SDK
Blend4Web developer
21 May 2017 19:44
thank you, I will evaluate asap, but for now, it is sunny and Sunday of a long weekend, so off I head to find women in bikinis…
24 May 2017 11:38
it is working for the most part. Some tweaking and control work will be needed, but this is now understood. Thanks!
 
Please register or log in to leave a reply.