由用户创建的信息 walrus
22 June 2019 08:45
Hi everyone,
I would like to know if there is a way to get the object_ID (or data_id) of two colliding objects? To be clear, please let me try to explain my problem. I have a scene with an object (a cube) that is moved with the mouse. Then, every 3 seconds an OBJECT is loaded dynamically in the scene (this is a model loaded from a .json file with animation and physics properties defined, including de collision_id). My goal is to touch the OBJECT with the cube and then the OBJECT have to be removed from the scene.
So my idea is to get the OBJECT_ID to later call m_scene.remove_object(OBJECT_ID) or something like that.
As many OBJECTS are loaded dynamically from the same .json file, all of them have the same collision_id, object_name in my scene, so I don't know how to distinguish which one have been touched with the cube.
I will appreciate any idea…
Thanks in advance
I would like to know if there is a way to get the object_ID (or data_id) of two colliding objects? To be clear, please let me try to explain my problem. I have a scene with an object (a cube) that is moved with the mouse. Then, every 3 seconds an OBJECT is loaded dynamically in the scene (this is a model loaded from a .json file with animation and physics properties defined, including de collision_id). My goal is to touch the OBJECT with the cube and then the OBJECT have to be removed from the scene.
So my idea is to get the OBJECT_ID to later call m_scene.remove_object(OBJECT_ID) or something like that.
As many OBJECTS are loaded dynamically from the same .json file, all of them have the same collision_id, object_name in my scene, so I don't know how to distinguish which one have been touched with the cube.
I will appreciate any idea…
Thanks in advance
22 June 2019 08:43
Hi everyone,
I would like to know if there is a way to get the object_ID (or data_id) of two colliding objects? To be clear, please let me try to explain my problem. I have a scene with an object (a cube) that is moved with the mouse. Then, every 3 seconds an OBJECT is loaded dynamically in the scene (this is a model loaded from a .json file with animation and physics properties defined, including de collision_id). My goal is to touch the OBJECT with the cube and then the OBJECT have to be removed from the scene.
So my idea is to get the OBJECT_ID to later call m_scene.remove_object(OBJECT_ID) or something like that.
As many OBJECTS are loaded dynamically from the same .json file, all of them have the same collision_id, object_name in my scene, so I don't know how to distinguish which one have been touched with the cube.
I will appreciate any idea…
Thanks in advance
I would like to know if there is a way to get the object_ID (or data_id) of two colliding objects? To be clear, please let me try to explain my problem. I have a scene with an object (a cube) that is moved with the mouse. Then, every 3 seconds an OBJECT is loaded dynamically in the scene (this is a model loaded from a .json file with animation and physics properties defined, including de collision_id). My goal is to touch the OBJECT with the cube and then the OBJECT have to be removed from the scene.
So my idea is to get the OBJECT_ID to later call m_scene.remove_object(OBJECT_ID) or something like that.
As many OBJECTS are loaded dynamically from the same .json file, all of them have the same collision_id, object_name in my scene, so I don't know how to distinguish which one have been touched with the cube.
I will appreciate any idea…
Thanks in advance