Hi all,
Which way is faster to find the distance between two objects through a function update or a sphere collider with a trigger? If i use a trigger, i could link my proximity variable to the sphere radius ... so it is exactly the same in terms of functionality. But does a trigger has some internal functionality for not searching all the time for objects ? I want to use that for about a hundred objects so it will be nice if i do it the quick way. Sorry if it has been posted somewhere else but I searched a bit .
function Update()
{
var dist = Vector3.Distance(cameraObj.transform.position, transform.position);
if (dist < proximity)
{
TextOn = true;
}
else
{
TextOn = false;
}
}