Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

unity3D how can i get the solution to transform.position assign attempt for 'main camera' is not valid. input position is nan nan nan?

$
0
0
This is my code of the camera: public class followcamara : MonoBehaviour { // Update is called once per frame public Transform player; public Vector3 offset; void Update () { //debug.log(player.position); imprime la posicion del jugador. // transform.position = player.position; // si solo dejamos esta porcion de codigo, //la camara se pusiera en el jugador en 1ra persona, pero como la camara en este juegos la queremos en 3ra //persona, le agregaremos lo siguiente. transform.position = player.position + offset;// asi la camara se centra y se modifica a las coordenadas //que le pongamos. } } These are the values of offset that i put on the inspector: 0.1,2,-5 I get a lot of error, but these are the first three: ![alt text][1] These happens when I'm playing in the edge of a road at an certain rotation, something like these, but in the edge of the road. So when it happens y just disappear, and y give me a lot of errors. How can i fix these? I am new on unity. is my first time asking. I have to say to, its a endless runner so the object is constanly moving to z+, ![alt text][2] [1]: /storage/temp/112478-error3.png [2]: /storage/temp/112479-error-4.png

Viewing all articles
Browse latest Browse all 827

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>