- Home /
how to check enemy presence(or part of its body) on player's screen?
Hi, everybody! I have a problem with enemy check on player's viewport. I use raycast for it from player's head to enemy's center point. But I need to check whole the body, even if its only enemy's head above the wall. Some enemies are solid and don't have attached parts like "hand", "leg", "head".
For instance, when enemy appears on player's screen I want to add red outline on enemy mesh(I already have shader for this). The problem is: how to check enemy presence(especially parts of his body) on player's screen? There are many enemies(50-100) and they have different meshes(from very small to medium and big).
So is there any better way except raycasting? And if there isnt, how many rays should i cast and in what way to check whole enemy body with mostly all the parts.
I want to find better approach for this issue. So If u have an idea how to make this better just describe your idea in words without code. But I also will be pleased if there will be any useful code)
Your answer
Follow this Question
Related Questions
Boolean being overwritten 1 Answer
Raycast target sight? 0 Answers
How to Create enemy flash effect on Raycast hit 2 Answers
Tagging is working SOMETIMES? 1 Answer