This question was
closed Nov 08, 2019 at 01:46 PM by
RyanWhitehead for the following reason:
Problem is not reproducible or outdated
Question by
RyanWhitehead · Apr 16, 2018 at 12:06 PM ·
ontriggerenterrespawnrespawning
VR respawn only works once
Using VRTK and steamVR. I want it so when a player passes into a box under the floor, they will respawn at a set point. This is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Respawn : MonoBehaviour
{
[SerializeField] private Transform player;
[SerializeField] private Transform respawnPoint;
void OnTriggerEnter(Collider other)
{
player.transform.position = respawnPoint.transform.position;
}
}
This works fine for one respawn. After this the player passes through the trigger and nothing happens. Any ideas?
Comment
Answer by ewat · Nov 08, 2019 at 01:08 PM
You ever figure this out mate?
To be honest, I don't actually remember, and even if I did, I can't remember how i fixed it. Sorry to not be of any help, but I no longer have access to the equipment and files needed to test.