Unity / Oculus - Touch object as trigger
Hello,
I'm a complete newbie game developer, and I'm working on a project for class. In this project, we're using Oculus Touch and Unity to create a 3D environment, where the user can interact with several objects. I'm using Oculus SDK for avatar and platform.
One of our main plans for the game was having an object that, when found and touched, would teleport the player back to Scene 0, where the game starts.
Could anyone possibly help with this? I've tried looking multiple times on how to learn to do this on my own and couldn't find a concise answer.
Thank you.
=============================================================================
Edit1:
So far this is all I got working. It makes the scene change when the hands "touch" the object. I was wishing I could have it trigger only when the user grabs the book.
[SerializeField] private string loadLevel;
void OnTriggerEnter(Collider other)
{
if (other.CompareTag ("Player")) {
SceneManager.LoadScene (loadLevel);
}
}
Hope that provides some guidance to whoever helps me.