- Home /
duplicate
single script attached to multiple gameobjects, how to find a gameobject, player ontriggerenter's into with that single script ?
title has it all
9 game objects with trigger collider on them
when player enters that collider, I want camera to follow that gameobject instead of player
when player exits collider camera follows player again.
using simple ontriggerenter camera follows centre point of all gameobjects script is attached to instead of that perticular gameobject
what do I do ?
Answer by xill · Aug 21, 2019 at 02:06 PM
You should post your code.
And why not one script on your character to manage in what zone you are?
Follow this Question
Related Questions
OnTriggerEnter not working, tried everything! :( (C#) 3 Answers
how can i access to the scripts which have same name and were attached to the same gameobject. 2 Answers
Changing "Sprite Mode" from Single to Multiple breaks reference to sprite sheet. 1 Answer
Edit multiple assets at the same time? 2 Answers