How do you get the X and Z position of the map, which is in the center of the screen?
EN: How do you get the X and Z position of the map, which is in the center of the screen? PT: Como obter a posição X e Z do mapa, que está no centro da tela?
Answer by igorobm · Oct 01, 2017 at 03:36 PM
https://docs.unity3d.com/ScriptReference/Camera.ScreenPointToRay.html https://docs.unity3d.com/ScriptReference/Physics.Raycast.html
EN: takes the reference from the camera, shoots a ray using Camera.ScreenPointToRay by passing a new Vector3 (Screen.width / 2, Screen.height / 2, 0).
PT-BR:pega a referência da camera, dispara um raio usando o Camera.ScreenPointToRay passando um new Vector3(Screen.width/2, Screen.height/2, 0)
Your answer
Follow this Question
Related Questions
camera script problems and can't see the selected object 0 Answers
Does anyone know why transform.position isn't working? (See details) 1 Answer
How can i move my camera forward independent of its pitch? 1 Answer
How to move a camera smoothly to a fixed position and back using C#? 0 Answers
I have a problem with my Camera detecting and following the player!! pls help... 0 Answers