Answer by DaveA
There's probably better ways to do it but you can check if target is on screen by checking the renderer's 'isVisible' http://unity3d.com/support/documentation/ScriptReference/Renderer-isVisible.html...
View ArticleAnswer by Owen Reynolds
WorldToScreenPoint returns a Vector3. The 3rd (z) is the distance from the screen, with negative meaning behind you. So: var screenPos : Vector3 = ..... if(screenPos.z>=0) { // use it
View ArticleAnswer by DaveA
There's probably better ways to do it but you can check if target is on screen by checking the renderer's 'isVisible' http://unity3d.com/support/documentation/ScriptReference/Renderer-isVisible.html...
View ArticleAnswer by Owen-Reynolds
WorldToScreenPoint returns a Vector3. The 3rd (z) is the distance from the screen, with negative meaning behind you. So: var screenPos : Vector3 = ..... if(screenPos.z>=0) { // use it
View Article
More Pages to Explore .....