Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Transform.position to an emty game object

$
0
0
Hi all.
Im pretty new to unity, and i am working on a 2d platformer.

I am using portals to transform.position player to another position. I started up with hardcoding the new position in the script, but then i will have to a new script everytime i use a portal.
I need help to find a way to set the new location i the inspector (emty gameobject).

The script is attached to the portal.

This is what i use now
Code (csharp):
  1.  
  2. public class Transit : MonoBehaviour
  3. {
  4.     private GameObject player;...
Transform.position to an emty game object

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>