I'm trying to familiarize myself with ECS, I'm using package version 1.2.4. There are so many different approaches in documentation and none are quite what I'm looking for in my use-case and many are deprecated.
I'm struggling to understand how things come together when working with Queries of all Components of a type.
I have a large number of Entities that I'm trying to calculate gravity between.
I've approximated the calculations successfully through a Quadtree. I know what forces should be applied to each Entity.
To build my Quadtree, I needed a full array of all "ForceEmitters", so I used an EntityQuery. This was problematic because it doesn't return a reference, so modifying the PhysicsVelocity component does not have any effect in game.
I was able to get the references to the PhysicsVelocity via SystemAPI, but this didn't seem to have a way to gather all "ForceEmitters" to pass into my quadtree.
I believe this is a flaw in my understanding of how to use ECS/Jobs in general. I am looking for suggestions or advice on how to approach such a problem. I am happy to show code or meet if someone is willing to.