Clic para mover objeto

var smooth:int; private var targetPosition:Vector3; function Update () { if(Input.GetKeyDown(KeyCode.Mouse1)) { smooth=1; var playerPlane = new Plane(Vector3.up, transform.position); var ray […]

Cambiar color de material

using UnityEngine; using System.Collections; public class ChangeColorMaterial: MonoBehaviour { void Update() { if (Input.GetKeyDown(KeyCode.R)) { GetComponent ().material.color = Color.red; } if […]

Reproducir animaciones del Animator

using System.Collections; using System.Collections.Generic; using UnityEngine; public class Animaciones : MonoBehaviour { void Update() { if (Input.GetAxis(«Horizontalusing System.Collections; using System.Collections.Generic; […]

Movimiento 2D con salto

using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour {     public float moveSpeed; //variable que controla […]