percentage bar parented to a moving rotating object

I am currently trying to create a percentage bar (health, completion, statPercentage). I found one implementation that uses 2 planes, and then re-sizes the more forward one, to have it look like a percentage meant for a 2D game where objects never rotate. but where if the objects used to display this percentage would be parented to an object that can rotate this causes problems, and beyond that the game takes place in a 3D space where any given face of the parent can be facing the camera, and be proxy this plane system would need to be adjusted.

I know that I could probably get away with this by using GUI, but I would much rather use the plane method so that is is not always on the topmost draw layer.

how could I implement this type of percentage bar system so that the percentage bar:

  • move with the object.
  • is always upright even when the object is rotated.
  • is always facing the camera.

Hey Gardian06,

Maybe I’m misunderstanding your question, but could you parent the panes to the main camera?

If it’s clear I don’t understand, please let me know so I can modify my answer.

I hope this helps! -Gibson

What about:


… in each Update step.


To make it move with the object, just make it a child of the object.