So i have a car entity, and a obstacle entity.
The
car needs to avoid hitting the obstacle, and the code for that will
obviously be in a system (all logic goes in the systems).
But a
system operates one a single specific type of node. And my car and
obstacle entities do not have overlapping components to create a common
node.
The car needs to have a velocity component, the obstacle does not. The car has a destination component, the obstacle does not.
So how will I have access in my system to both cars and obstacles, in order to do the required obstacle avoidance?
Or should I keep a separate list of obstacles in my System? ( and I'd have to ensure it is kept up to date when obstacles are created - destroyed).