I am trying to figure out if an object is within my Camera’s sight, I have done this before using
public static bool ArmySpawnerInScreenSpace(Vector2 UnitScreenPosition)
{
if((UnitScreenPosition.x < Screen.width UnitScreenPosition.y < Screen.height)
(UnitScreenPosition.x < 0f UnitScreenPosition.y < 0f))
{
return true;
}
else
{
return false;
}
}
Something like that. However it seems that since I am using an isometric camera angle that this formula no longer works.
my camera is angled at:
X: 30
Y: 45
Z: 0
Any tips or ideas would be super helpful, cheers!