Комментарии:
Bro not to disrespect but what kind of background music is that, I mean it is good but not fitting with the video type, you know what I mean
ОтветитьThank you very much!!!
Ответитьthanks you
Ответитьyou can make scp 173 with this
Ответитьthanks for the song <3
and the awesome video hehe
How to make a respawn with this method? 🤔
ОтветитьThank you for sharing. I'm trying to do this feature.
ОтветитьWorks excellent! Thanks a lot!
ОтветитьMaybe I am ignorant, but why not just use the OnBecameVisible() and OnBecameInvisible() event functions?
ОтветитьThanx !!!!
Ответитьpublic GameObject target;
public Camera cam;
private bool IsVisible(Camera c, GameObject target)
{
var planes = GeometryUtility.CalculateFrustumPlanes(c);
var point = target.transform.position;
foreach (var plane in planes)
{
if (plane.GetDistanceToPoint(point)< 0)
{
return false;
}
}
return true;
}
private void Update ()
{
var targetRender = target.GetComponent<Renderer>();
if (IsVisible(cam,target))
{
//your sentence
}
else
{
//your sentence
}
}
Thanks you so much! (I couldn't find a better tutorial!)
Ответитьi still shows if object behind another object is there a way to prevent that
Ответитьyeess simple and to the point ! thanks aloot
ОтветитьThanks for the tutorial.
how about when i want to hide an object. Lets say i want to hide tree, grass, or any else. Should i create more "public GameObject target;" ?
please other tut about third person with camera and game object target
ОтветитьIt can still detect even the target object was blocked by other objects
ОтветитьThanks, helped me so much! have a great day.
ОтветитьVery Good
Ответить