I browsed the forum and couldn't find where this question may have been answered previously. So sorry if it has.
Basically, I need a health bar to be attached to an entity and need it to render and to scale it according to the health.
So i have my 'actor' with a render component. This component has a method that creates its scenenode.
Is it in this method that I need to include the health bar scenenode as a child?
I need a render component for the health bar with render data and so I can update its scale based on the health values.
I want to keep it generic as possible because I am not sure yet what I will be adding health bar's to, and an entity may include health but not necessarily render a health bar. Perhaps I just need a second rendercomponent for the entity...
I am not sure how to handle this. Any tips will be greatly appreciated.
kind regards.
Basically, I need a health bar to be attached to an entity and need it to render and to scale it according to the health.
So i have my 'actor' with a render component. This component has a method that creates its scenenode.
Is it in this method that I need to include the health bar scenenode as a child?
I need a render component for the health bar with render data and so I can update its scale based on the health values.
I want to keep it generic as possible because I am not sure yet what I will be adding health bar's to, and an entity may include health but not necessarily render a health bar. Perhaps I just need a second rendercomponent for the entity...
I am not sure how to handle this. Any tips will be greatly appreciated.
kind regards.