Hi !
I want to create a game in which i want the certain environment props to activate when user is near them , just like in many stunt and raunner games environment objects start moving when player reaches near them ,
I can add scripts on them and enable or Disable them based on player distance but i was wondering is there a better way to aproach this !
As checking for update inside multiple objects in costly !
Thanks in advance !
to me, its either do the usual calc from object to player - something like:
float dist = Vector3.Distance(other.position, transform.position);
or use triggers which detects when a player is enters them.
void OnTriggerEnter(collider col)
{
}