Brains Gallery: Teleport…please.

What’s the strategy of teleporting in general? If certain condition is true Players position will change to a pre-defined location. In my case certain condition is colliding with specific objects (frames). Later I will change to request teleport after collision what will allow me interaction with the player i.e. asking him where to tp or if at all.
Firstly I headed toward this script given to the player. I noticed it would need an if-statement varification for every single frame object in the gallery and is activated by every collision the player inducts. Not only that it’s unhandy to organize, it will propably also slow down my game. Solution: Every frame object is a trigger to tp the player to a modifiable aim in another room.

In reality: Why is Player even after ridiculous resizing of the colliders colliding with everything except the triggers? A trigger that can not collide will never be triggered:D
Turns out that triggers really can not collide. WHAT? Not digging into this now. But colliders do collide, and that can evoke an if-statement. When I finally managed right capsensitive spelling one of my frames did what he design for: detecting collision, check if it’s a player, take this player and teleport it to flexible aim in another room.

My very first self-googled Unity script. I am so proud.

public class teleport1_2 : MonoBehaviour{
public GameObject aim;
void OnCollisionEnter(Collision otherObject) {
if (otherObject.gameObject.CompareTag(„Player“)){ otherObject.gameObject.transform.position = aim.gameObject.transform.position; } }