Repository navigation
Replies: 1 comment
|
You can the So if you create a query Those entities are guaranteed to have what is defined in the query |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to test out a simple scenario for Relationships, but I don't think I've seen mention in the docs or tests what the ideal solution is for getting a component of a relationship target. In my example I am trying to make one entity change direction toward another entity.
Here is a minimal example:
C_Targeting is a tag component with no data.
Here is the targeting system
In the system's process function, I need a C_Transform component from the target in order to know which direction to point. But I can't figure out if there is a way to formulate the system query to guarantee that the entity will have a C_Transform at that point. I can see examples of adding an entity in the docs/tests, but I don't see any examples of using that target entity further, like reading from one of its components. Is there a way to handle this without just assuming a component will be present?
All reactions