My objective with the copy of the metaselector:
I have a metaselector of the full scene (all the objects in my scene) and would like to work on a copy of it to remove triangle selectors and then apply the updated metaselector to the collision reponse animator.
Why:
I would like from the metaselector create a collision response animator for EACH NPC, but remove their own triangle selector so they won't collision with themselves.
Tries:
Try #1: I Tried to add back the removed triangles from the metaselector AFTER assigning it the current collision response animator, and the result seem that the collision is blocked (each objects seem to be stuck)
Try #2: From a search from google on duplicating an object I tried that:
IMetaTriangleSelector* meta is my current metaselector object: done this:
Code: Select all
IMetaTriangleSelector* meta2(meta);
My current solution:
Destroy and recreate the meta selector each time for each NPC. Creating the metaselector is pretty fast now, but this method is inneficient and could take more time with more NPCs or objects.
Question:
Could someone help me by showing me a way to copy the metaselector without having to rebuild it each time? I need to work from a copy and keep the "full scene" metaselector in memory.
Also: is there a way to update the meta selector on the collision response animator without destroying it and recreate it? Right now, I'm rebuilding everything (meta selector + collision response). When a NPC "dies", his collision triangles need to be removed from all the collision response animators from all NPC...