It should be possible to attach one Entity to another, calculating its position relative to the attached-to object. This kind of thing is needed for moving platforms, rush jet, shield weapons, etc.
Possible implementation could be via an Attachment object, which all Entities have a unique_ptr to. When it's non-null, positions are calculated based on the attachment. When it is null, positions are calculated in absolute terms.
It should be possible to attach one Entity to another, calculating its position relative to the attached-to object. This kind of thing is needed for moving platforms, rush jet, shield weapons, etc.
Possible implementation could be via an
Attachment
object, which all Entities have aunique_ptr
to. When it's non-null, positions are calculated based on the attachment. When it is null, positions are calculated in absolute terms.