Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

241
Vistas
setting player go.transform.position not changing position

Trying to move a player object to the start location built into each level of the game at level start but the object does not reposition. The player is not a child of another so I am working with root transform here.

//move player to start position (I know find is expensive)
startPosition_GO = GameObject.Find("StartPosition");
playerGO.transform.position = startPosition_GO.transform.position;

//and just to be because
playerGO.transform.position = new Vector3(startPosition_GO.transform.position.x, startPosition_GO.transform.position.y, startPosition_GO.transform.position.z);

player object stays where it was and does not move. enter image description here

including two images, first before starting the level you can see the starting location game object (the pink square). The code above is called at level start. The second image shows where the player (with the arrow nav icon on it sits after the code is executed. enter image description here

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Try just this code to move the player position.

startPosition_GO = GameObject.Find("StartPosition");
playerGO.transform.position = startPosition_GO.transform.position;
over 4 years ago · Santiago Trujillo Denunciar

0

Set the position once. You could remove this

playerGO.transform.position = new Vector3(startPosition_GO.transform.position.x, startPosition_GO.transform.position.y, startPosition_GO.transform.position.z);

Or this and it should work.

playerGO.transform.position = startPosition_GO.transform.position;

The code seems redundant which could lead to issues.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda