Answers for "unity how to move an object to another object"

C#
1

unity how to move an object to another object

// 3D
transform.position = new Vector3(GameObject.Find("Object").transform.position.x, GameObject.Find("Object").transform.position.y, GameObject.Find("Object").transform.position.z);

// 2D
transform.position = new Vector2(GameObject.Find("Object").transform.position.x, GameObject.Find("Object").transform.position.y);
Posted by: Guest on February-12-2020

Code answers related to "unity how to move an object to another object"

C# Answers by Framework

Browse Popular Code Answers by Language