Bar not rotating on Y axis to face me?

Shouldn’t it be doing this with the UISocket class? It isn’t; even when I replace my own image components with the raw images from Ben’s original way of doing this, the health bars still don’t swivel on the y axis to face me when I move.

I figured out the mod I needed for my bar. For health bars with a left anchor, you evidently need to change your late update function in the socket to look like this:

void LateUpdate()
{
transform.LookAt(cameraToLookAt.transform.position);
transform.rotation = Quaternion.LookRotation(cameraToLookAt.transform.forward - cameraToLookAt.transform.right);
}

Privacy & Terms