I'm noticing that the nature of OOP inheritance is becoming a frustration in how I want to implement my project, and I'm considering moving to ECS.
What I'm interested in is whether there's a drawback to combining the two in a certain circumstance.
Say I have a "position" component, which basically just has world coordinates.
In my current implementation, some objects have a position which is dependent on other objects (for example, offset at a certain angle and distance from the parent object). At the moment, this is handled by some objects having getters for their position variables that return a position based on the position of the object they're attached to, and setters that apply the appropriate movement to their parent object.
Is that the same way you'd handle this in ECS? If there's a system that needs the position of an entity, and doesn't care whether that position is absolute or derived, would you have a component which instead of storing position, has an internal reference to another "position" component, and returns the coordinates based on the result of a getter? And then have the system see both of those components - the absolute and the derived position components - as identical?
Intuitively this seems like the right way to go, but I'm very new to ECS so I'd love to know if I'm missing a better way to do this.