Forum

hide_object(), children and lamp

04 December 2015 01:33 #5628
Hello,

i try to hide an empty with all his children :

m_scenes.hide_object(m_scenes.get_object_by_name("my_empty"), false);


it dosen't work, it seems it hides only the empty, not the children.

The same when i try to hide a lamp :

m_scenes.hide_object(m_scenes.get_object_by_name("my_lamp"));


it gives this error :
B4W ERROR: show/hide is only supported for dynamic meshes/empties

The API doc says it is possible :
Check if object is hidden. Supported only for dynamic meshes/empties and lamps.

is it? how do i do?

Thank u


04 December 2015 09:51 #5630
Hello and welcome to the forum.

Could you tell me, please, what version of b4w engine (b4w.min.js) you use? The hide/show methods for lamp objects and children was supported in 15.11 b4w version. I see the old version of console message. In the latest version it is "B4W ERROR: show/hide is only supported for dynamic meshes/empties and lamps".

If you use the latest b4w engine version, please, let me know.
Blend4Web developer
04 December 2015 09:54 #5631
Also, don't forget to enable "Force dynamic object" property on your empty object.
Blend4Web developer
04 December 2015 10:17 #5633
I've just downloaded and tested the latest SDK version. It's works fine. My scene:

Hide/show empty with child:


Lamp:


Blend4Web developer
04 December 2015 12:11 #5638
OK,
thanx Roman, you're right :
I started this project on the 15_10 SDK, and it keeps the old b4w.min.js
I replace by the new one and it 's ok!

Thx
 
Please register or log in to leave a reply.