Bumpy WorldToScreenPoint

Hi guys,

I am trying to display a character name (to begin with) above the player (third person).
I use WorldToScreenPoint(transform.position) in onGUI…

The player is walking with a navmesh agent on a navmesh baked terrain (point & click).

The name is following the player as desired but the name shakes a lot when I walk the player.

Any fix for this?

Thx

Ok, I figured it out myself… I needed to ceil the screenpoint values with Mathf.CeilToInt

Here is the code:

function OnGUI() {
	var namePlatePos : Vector3 =  Camera.main.WorldToScreenPoint(transform.position); 
    GUI.Label(Rect(Mathf.CeilToInt(namePlatePos.x), (Screen.height - Mathf.CeilToInt(namePlatePos.y)), 100, 50), username);
}