Hello,
I’m trying to scale myself down when i trigger (with the trigger button in VR) a object (the road).
The Default object is a road and i give it a Teleport Area and set the Trigger On.
The script that i placed on Default object is this and i gave the object Player Root (with the camera in it) the tag Player :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Scale_script : MonoBehaviour
{
// Start is called before the first frame update
void OnTriggerEnter2D(Collider2D other)
{
if (other.tag == "Player")
{
other.transform.localScale = new Vector3(0,001f, 0,001f, 0,001f);
}
}
}
But when i trigger in VR on the road nothing happens. I also tried scaling up to 3, but also nothing happens. The only thing i see is that the controller line (for teleporting) is turning white instead of red when i focus it on the road.