Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

152
Views
Cómo obtener la posición de Gameobject en la resolución de pantalla que no pasó la resolución para establecer

Tengo un objeto en la pantalla. Al principio se ubica en x=0,y=0,z=0 luego se mueve a una posición diferente. Solo quiero asegurarme de que este objeto no se mueva a ubicaciones invisibles para el usuario (es el personaje principal del jugador y no quiero que el jugador pueda regresar desde su ubicación actual ni avanzar con la cámara que lo sigue).

¿Puedes explicarme qué debo hacer aquí?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Creo que estás preguntando:

Si un personaje jugador en la pantalla se está moviendo, querrás que la persona sentada frente a la computadora pueda verlo siempre. Para hacer esto, debe configurar la cámara para seguir este objeto.

Aquí hay algunos enlaces que pueden ayudarlo a comenzar:

http://unity3d.com/support/documentation/Components/class-Camera.html

http://unity3d.com/support/documentation/ScriptReference/Camera.html

over 4 years ago · Santiago Trujillo Report

0

Este tutorial tiene un ejemplo de cómo implementar una cámara que sigue al jugador.

http://unity3d.com/support/resources/tutorials/3d-platform-game.html

over 4 years ago · Santiago Trujillo Report

0

using UnityEngine; using System.Collections; public class NewGameScript : MonoBehaviour { float t=0f; float v=20f; float dist; // Use this for initialization void Start () { } void Update () { if(Input.GetKeyUp("up")) { if(t<0.1) { t +=Time.deltaTime*0.07f; } dist=t*v*0.5f; gameObject.transform.position +=transform.forward*dist; } else if(Input.GetKeyUp("down")) { if(t>-0.1) { t -=Time.deltaTime*0.07f; } dist=t*v*0.5f; gameObject.transform.position +=transform.forward*dist; } else if(Input.GetKey("left")) { transform.Rotate(0,-0.9f*(dist+1), 0); gameObject.transform.position +=transform.forward*0.1f*(dist+1); } else if(Input.GetKey("right")) { transform.Rotate( 0,0.9f*(dist+1),0); gameObject.transform.position +=transform.forward*0.1f*(dist+1); } } }
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!