I currently have a portal in a 2D level of mine and was wondering how I would write a script that would trigger the player upon contact with the portal collider to be moved to the center of the portal and then spin and shrink out of the level and into the next one. I began scripting the players position to the center of the portal with my very limited knowledge and nothing happened.
#pragma strict
var Player : GameObject;
function OnTriggerEnter (other : Collider) {...
Portal Scripting
#pragma strict
var Player : GameObject;
function OnTriggerEnter (other : Collider) {...
Portal Scripting