Combine two material world position offsets

Hi, i am making an Healthbar material and it works, there is only an issue that i can’t solve, i need to have a World position offset to scale the material by distance and another one to face the camera, they work alone but as soon as i combine them with the Add node it stops working.

1 Like

Give yourself example numbers and work out the math.
Does adding the 2 actually make sense?

Assuming it does, “stops working” isn’t really something descriptive enough for us to say what’s up.

What does it actually do?
Is it giving an error, or is it visually not doing what is supposed to?

I believe that align mesh is a rotation - while the other function just a location.
As such, if you do the math, you would probably realize that it doesn’t work…
The solution would be to use the new location to then add the rotation.

EG: plug the location result into the world position node of the rotation result.

The final result may actually be what you need.