Question by
sebastardo · Jun 18, 2020 at 01:25 PM ·
triggerpositionchange
OntriggerEnter reset gameobject position.
i want to enter a trigger and then camera(or whatever) POSITION is reset to 0,0,0.
here is my attempt script i just want to do that simple thing but it seems imposible..
public class Position_reset: MonoBehaviour
{
public GameObject camera;
private void OnTriggerEnter(Collider other)
{
camera.GetComponent<Transform>;
camera.transform.position = new Vector3(-0, 0, 0);
camera.transform.rotation = Quaternion.Euler(0, 0, 0);
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613001238im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Switch Position of two moving objects 1 Answer
why does my view change 0 Answers
Change position in OnTriggerEnter2D 0 Answers
Change position parameters of object onMouseOver 0 Answers
Animation transition problem 1 Answer