Thank you.
The truth is that I don't know why the music sounded like that, I distorted it a bit but I think it got stuck or something like that, for the text I'm going to try to fix it.
Hi. i want to teleport the player when it hits something but i don't know why it doesn't work.
this is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class teleport : MonoBehaviour
{
public GameObject spawner;
public GameObject player;
// Start is called before the first frame update
void Start()
{
}
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
player.transform.position = new Vector3(spawner.transform.position.x, spawner.transform.position.y, spawner.transform.position.z);
}
}
}
If anyone knows why I would appreciate if you could tell me.
Hi I'm new at game development and this is my first game.
https://saurio.itch.io/ballsvssquares
And I would like to know what you think of him.