My question is whether massive usage of trigger volume collisions makes a significant performance hit or not.
Of course, for just a few trigger volumes there's no problem. However when having hundreds of trigger volumes performance may be a concern.
I am thinking about using trigger volumes everywhere where game logic should happen, but I don't know if it will slow the engine down or not.
Trigger volumes does not generate contacts so I think they are already quite lightweight, however I don't know how expensive is for Newton to always calculate collisions of trigger volumes with other collision primitives, especially when some bodies are inside the trigger volume and they stay there for a while.
To emphasize that I am talking about really heavy usage of trigger volumes, let use as example a strategy game. Let say that for every entity we maintain two trigger volumes: one sphere for the view range and one sphere for the weapon range. These are attached to the body of the entity somehow. Using the callbacks it's now easy to decide when an entity should automatically move to an enemy unit (when it's in view range but out of weapon range), or when to shoot (when it's in weapon range).
Of course, I know that this is not the most optimal way how to solve strategy game AI, I just use this as an example to show a use case when one may use huge amount of trigger volumes.
Anyway, my question that would this solution work in practice with high amount of entities? Are trigger volumes lightweight enough for such thing?
P.S.: One more question! It's not related exactly to the topic but it's about trigger volume collisions: can I create a compound collision which is made of one or more normal collisions and one or more trigger volume collisions? If yes, then how? If no, then you can take this as a feature request
