Input Flashcards

Mover objeto com setas

1
Q

public float horizontalInput;
(Project settings, Input Manager, axes..”Horizontal”)
Incluir o horizontalInput no comando translate.

A

horizontalInput = Input.GetAxis (“Horizontal”);
Transform.Translate(Vector3.rightspeedhorizontalInput *Time.deltaTime);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

public float forwardInput;
inserir forwardInput no comando translate.forward.

A

forwardInput = Input.GetAxis ( “Vertical”);
transform.Translate(Vector3.right

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Fazer o carro rodar ao invés de deslizar

A

transform.Rotate ( Vector3.up, horizontalInput * turnSpeed* Time.deltaTime);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Pegar uma tecla p lançar objeto

A

if (Input.GetKeyDown(KeyCode.Space)
{
….
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

private void OnMouseDown()
{
Destroy(gameObject);
}

A

Destrói objeto pelo clique do mouse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly