Unity 2D TELEPORT SYSTEM | Unity 2D Platformer Tutorial #12

preview_player
Показать описание
In this Unity 2D Tutorial We'll make a TELEPORTATION SYSTEM.
We'll use Simple C# code to make teleportation system as possible.
How to teleport Player / Character in Unity?

Enjoy the video ☕

————————————————————————————
🖐 Hi Game developer
Welcome to Rehope Games I'm Murat

I share unity tutorial videos on my channel. if you want to make a game with unity (especially 2d platformer game), the videos here will definitely interest you.

————————————————————————————

#unitytutorials, #unity2d, #unity2dplatformer
Рекомендации по теме
Комментарии
Автор

nice video don't gave up .... big fan u r videos ... keep rocking..

neerajramnj
Автор

Thank u so much I weeks breaking my head with scenes this code will make things allot more smipler

iop
Автор

nice work! thank you for the vids! hope your followers will find you soon!

owustrycia
Автор

Awesome video, i was searching for a teleport system and this one is perfect for my project !
But now your portal made with Particles Effect is a must have !
Can you share with us the details of the Particle System you used for it ?
In this video we can find some informations but the parts inside Emission, Shape, Velocity over Lifetime... are hidden.
It will be great if you can share it with us
But even without that, your videos are amazing
Thanks for all

clementparrot
Автор

nice tutorial and excellent presentation of material, thank you

yanegrib
Автор

thank you i made it on my 3d game and it is awsome

mahmoudtaha
Автор

I dont know if you still answer the comments, but i want to ask you something, how can I make so that the player will only teleport when he press a certain button?

(srry about my english, it isn't my native language :p)

sneemoo
Автор

Hi, can you tell me how you make that particle effect for the portal?

GiangNguyen-host
Автор

Script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PortalController : MonoBehaviour
{
public Transform destination;
GameObject player;

private void Awake()
{
player =
}

private void OnTriggerEnter2D(Collider2D collision)
{
if
{
if(Vector2.Distance(player.transform.position, transform.position) > 0.3f)
{
player.transform.position =
}
}
}
}

MrLucas
Автор

could you provide sprites for teletransport

josedanielgrijalbaosorio
Автор

I've found your video while trying to resolve my problem with teleportation system. Thank you for this tutorial but I have some problem with animation...
Animations portalin/portalout use "scale" of player object... that is why animation work correctly only when player teleports on the right, but if I want to teleport to the previous position (left teleport) animation use scale of the "right" teleportation. And after end of animation a have oposit value of the localscale (player can move but look on the opposite side of running)
Sorry for my English... if it possible, please help

НикитаПанкин-жг
Автор

Can u add portal to other scen file ..?

neerajramnj
Автор

Incredible! Thanks to this, I have more ideas for interesting levels, and it's such a cool, clear code!
One question:
my particle system is sort of under the skybox /background. The background layer is 0, the particle layer is 5, the highest of the layers. I don't know what I'm doing wrong.

aleksandraaleksandra
Автор

Doesn't work for me, i have a charachter select screen in a different scene and while it works with a normaal charachter(prefab), the moment i use a charchter from the character select screen it doesn't want to work and gives me an error

lilili
Автор

Maybe you can assist?

I have this script as follows for 3D area. I am trying to get it so if one or two players are in a scene o have a companion AI, the moment they enter one portal they face the exist direction. Evey thing works as intended other than I can't get the exist direction to to work.

{
public Teleporters target = null;
public bool BlockTeleport { get; set; }

private void OnTriggerEnter(Collider other)
{
if (target == null)
// If no target is assigned the teleporter will not teleport. So you could use this as destination if you want.
return;
if (BlockTeleport)

return;

target.BlockTeleport = true;

other.transform.position = target.transform.position;
}

private void OnTriggerExit(Collider other)

{
if (BlockTeleport)

BlockTeleport = false;

}
}

talismanskulls
Автор

i dont understand this error

The AnimationClip 'Portal In' used by the Animation component 'Player' must be marked as Legacy.
UnityEngine.Animation:Play (string)

The animation state Portal Out could not be played because it couldn't be found!
Please attach an animation clip with the name 'Portal Out' or call this function only for existing animations.
UnityEngine.Animation:Play (string)

lummonhazle
Автор

why am I getting errors about the aniamtion clip not being legacy and etc

Akhazy