Transform Flashcards
Coding with Transform in Unity
1
Q
public Vector3 scaleChange;
A
transform.localScale +=(scaleChange * Time.deltaTime);
2
Q
public Vector3 positionChange;
A
transform.position += (positionChange * Time.deltaTime);
3
Q
public Vector3 rotateChange;
A
transform.Rotate (rotateChange *Time.deltaTime);
4
Q
Move object forward ( depende do eixo que quer mover)
A
transform. Translate (O,O,1);
transform. Translate ( Vector3.forward);
transform. Translate(Vector3.forward *Time.deltaTime * 20);
5
Q
public GameObject player;
Camera segue o player
A
transform.position = player.transform.position + new Vector3 ( 0,5,-7);
6
Q
void LateUpdate() {}
A
tira glitter da tela
7
Q
public float turnSpeed;
A
transform.Translate (Vector3.right * Time.deltaTime*turnSpeed);