I'm working on my first ECS/DOTS project and I'm figuring out how to structure my entities and systems! I was hoping someone would be able to share some ideas for how to approach this best.
- A ship will fire missiles
- Each missile may be assigned a target up front on instantiation, or pick one at runtime (if the target disappears for example)
Right now I have the data structured like:
// i'm thinking this may make sense to break into smaller components in time (MissileNavigationData, MissileDamageData, etc?)
public struct MissileData : IComponentData
{
// info about speed and maneuverability
}
public struct TargetData: IComponentData
{
// what I care more about is the entity's LocalTransform data, but I'm not sure if there's a way to keep this up to date, so I'm thinking I need to fetch it via the entity?
public Entity entity;
}