Forum

set_parent

20 March 2016 01:33 #8363
Hello,

I am instancing an object and I would like to make it child.
Is a set_parent function like does exist?

thank you
20 March 2016 02:42 #8365
Or maybe a replace function?

I create an empty object already parented in Blender and I replace it by the instance?

Possible?
21 March 2016 18:13 #8407
Hello.

Is a set_parent function like does exist?

You should use append_stiff_trans_rot after coping.
Blend4Web developer
28 March 2016 14:35 #8540


Hello,

Without those two lines it's working well without constraints :-/.

m_cons.append_stiff_trans_rot_obj(new_obj, source_obj, 0, 0, 1.0);
m_trans.update_transform(new_obj);

How can I fix it?
29 March 2016 11:24 #8557
m_cons.append_stiff_trans_rot_obj(new_obj, source_obj, 0, 0, 1.0);
Hi, it is "append_stiff_trans_rot" not "append_stiff_trans_rot_obj".
Blend4Web Team
29 March 2016 23:27 #8576
Thanks!
Now I have a "get_extension" error:



What does it means?
30 March 2016 10:47 #8582
This extension is used for debug purposes and allows to precisely calculate the amount of rendering time. The message means that it's not supported, but you can pay no attention to this.

Also, the "update_transform" method is not exposed to the API and you shouldn't use it.
Blend4Web Team
 
Please register or log in to leave a reply.