Hello everyone,
I have been looking into a lot of things about Entity component systems and after thinking how i would create one for a game I stumbled across a couple of questions that i need some help answering.
When it comes to ray casting and collision I can see an easy answer to record collision and letting another system deal with the outcomes like damage or HP buff or whatever, 1 of those solutions being some kind of messaging system that stores the collisions (well the 2 entities ID's) and a second solution could be creating a component with this data. All of this could be recorded in the collision system no problem.
Where i see a problem is where ray casting might be done for things other then collision like say avoidance steering behaviour or maybe guard line of sight. I don't see a way to easily resolve this issues as doing this check in say a steering behaviour system is possible but I don't feel its very efficient.
Another ways I have thought about it is to let systems talk to the collision system, but again I don't know if this is really a good idea.
Do anyone have any ideas on a good way to resolve this problem (and i guess problems like it) or if any of the ways i have suggested are viable.
Cheers for any input given.