Im trying to use Camera.main.ScreenToViewportPoint(player.position)
well since MainCamera is attached to player in hierarchy shouldnt this always give same position i mean player and camera move together and their relative position is the same but somehow when i use this on every frame its changing as player changes and it changes a lot ?
// Vector3 playerpos = Camera.main.ScreenToViewportPoint(rb.transform.position);
am i missing the definition of command or do i have a bug ?