using System.Collections; using System.Collections.Generic; using UnityEngine; public class cs01 : MonoBehaviour { public void moveRight() { //GameObject.Find("Sphere").transform.position = new Vector3(3.0f, 0.5f, 0); GameObject.Find("Sphere").transform.position += new Vector3(1.0f, 0, 0); } public void moveLeft() { //GameObject.Find("Sphere").transform.position = new Vector3(-3.0f, 0.5f, 0); GameObject.Find("Sphere").transform.position += new Vector3(-1.0f, 0, 0); } public void moveForward() { //GameObject.Find("Sphere").transform.position = new Vector3(0, 0.5f, 3.0f); GameObject.Find("Sphere").transform.position += new Vector3(0, 0, 1.0f); } public void moveBack() { //GameObject.Find("Sphere").transform.localPosition = new Vector3(0, 0.5f, -3.0f); GameObject.Find("Sphere").transform.localPosition += new Vector3(0, 0, -1.0f); } }