I’m creating a sidescroller and for debugging purposes, I need to be able to check the sprite’s position within camera field of view (specifically, how far from the left edge of the window the character is) instead of in the world coordinates. Thus, using:
Debug.Log(playerTransform.position.x);
Doesn’t give me what I need. Neither does localPosition.x cause the sprite does not have any parent - is there any way to check it apart from parenting Camera to the player which I wouldn’t want to do cause quite often it does not move along with the player?