I used the collision response and the meta selector for all my small projects and experiments, but lately, I had a little problem with it.
It's working but It's really slow to update geometry for the "world" for the collisions...
I'm not asking this now, since you guys have a hell of things to do and it's not getting anything to do with the rendering. It's just that theses little changes (I think there should not too much thing to change) might help a lot to improve performance when dealing with elements that changes in a collision world.
My first problem. (example)
I have 60 nodes and the player and want them to have each a collision responses animator, that use the "world" for the collsion.
If I use the "world" (meta selector), it contain the triangles used in the node that collision response animator. This will make the node collision with itself and get stuck.
A nice thing that would resolve this, would be that the collision response animator don't use the triangles of the node its' assigned on.
A quick solution was to remove the triangles of the node from the meta selector (method exist and work), but since the meta selector is shared among all the collision response animator assigned to all the nodes I can't reuse it for the other collision animators. So for one collision response animator in my scene, no problem. The problem occur if you want to have multiple collision response animators in the scene.
The current solution, that I'm using is to re-create a meta selector each time I'm assigning it to a collision response animator. So for the 60 nodes I have to create a meta selector (getting the triangles selectors for all the node except the one it's assigned so 59 nodes). It's working but its not really efficient. Removing a node from the "world" mean, rebuilding all this so it's not just done at startup but need to be done at runtime too, each time the "world" change.
I asked the forum if there would be a way to copy the object of the meta selector, so I could keep the "full world" in memory and only give reference to the collision response animation to a version without the triangles of the current node. Unfortunately, It's cannot be cloned without modifying the source code.
today I checked the source code, and I saw this in
Code: Select all
core::array<ITriangleSelector*> TriangleSelectors;
Still the easiest way for the user is that the CollisionResponseAnimator would not use the collision triangles of the node its applied on.