Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

teleportation problems (2d)

$
0
0
i want to make an enemy that when touched teleports the player to x0 y4 zn/a here is what I have: using UnityEngine; using System.Collections; public class kill_player : MonoBehaviour { public GameObject player; void OnCollisionEnter(Collision col) { if (col.gameObject.name == "murder") { player.transform.position = new Vector2(0, 4); } } } what makes it not work? and is it not the script?

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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