Форум

Сообщения, созданные пользователем stephane
03 августа 2021 14:55
Hi there,

Can someone tell me what does not work in my code?

My scene:
I have an eye camera placed on a cube that is my character.

I would like the left side of the screen to control the translation as the right rotation.

Here is the link to test my application:

Here is the link of my code:

I think the problem is in the setup_rotation() line 347, but I do not see.

I imagine that for top and down rotation I have to do it on the camera while the right and the left rotation on the character.
But in any case, for the moment the character does not makes any rotation …

If anyone knows it would be great.
In the meantime I continue to search.

thanks a lot
04 мая 2020 18:10
Just a mistake I made.

I tested with .is_dynamic and .is_mesh and it wasen't.
I tryed to delete the wrong object.
04 мая 2020 09:18
Hello
I'm trying to delete an object with "m_scs.remove_object (" obj ");" and I don't understand what I'm doing wrong but I have this message: "B4W ERROR can't remove object" xx ", it must be dynamic and type of MESH or EMPTY.

My objects are instances of a MESH made with m_obj.copy ("obj"); They are all dynamic, so I don't understand.

Thanks for help.
04 мая 2020 02:24
Hi,

I don't know if its the easiest way.
But I am doing like this:

-First, I like to use emptys objects in my blend file to save position (vertical_pos, horizontal_pos, computer…etc)
-than I detect if its a mobile or not.
- I catch my emptys to get translation
-I apply translation to objects at the loading
-I detect orientation screen change.
-I apply translation to objects if its need.

Does it help?
03 июля 2019 18:07
Hello,
I would like to copy and assign LOD object later.
I didn't find anything for that in the doc.

just this: "If you need to set the same LOD object for multiple different objects (for example, same-type trees, building, cars or shrubs), you should make a copy of it for every object (i.e., make as many copies as there are objects that will use this object as a LOD) and set these copies as LODs. "

So do you know how to set these copies as LODs?
Thanks a lot.
29 марта 2016 23:27
Thanks!
Now I have a "get_extension" error:



What does it means?
28 марта 2016 14:35


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?
20 марта 2016 02:42
Or maybe a replace function?

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

Possible?
20 марта 2016 01:33
Hello,

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

thank you
11 марта 2016 22:49