Quantcast
Channel: Answers for "Teleporter teleports one way not back [C#]"
Viewing all articles
Browse latest Browse all 8

Answer by Kelstek

$
0
0
Sorry for the scattered posting, but I think you'd do better to just attach a SphereCollider to the object, and use the OnCollide() method to detect when an object want to teleport, and to get their current transform. You can then use tags or the object's name to discriminate and only allow certain objects through (players only, players and enemies, players and projectiles, what have you). Also, that'd be less costly performance wise than my above suggestion of putting a FindObject() inside an Update().

Viewing all articles
Browse latest Browse all 8

Latest Images

Trending Articles





Latest Images