- Home /
Visual representation of Commandos style LOS
Hi guys,
we're working on a 2.5d stealth-puzzle game with an isometric view and are looking for a way to represent "Commandos " (http://www.youtube.com/watch?v=-BGThys6TPM&feature=related) style LOS for NPCs. meaning a triangle-like mesh that stops rendering colliders of blocking objects. We've been cracking our heads at this, figuring it could be done with some 100 raycasts line draw calls, but seeing as how this game is intended for the iOS mobile, it seems like a somewhat costly solution.
ideas?
thanks in advance!
$$anonymous$$aybe try to project the triangle and check for intersections with game objects that occlude? Then try to chop up the triangle based on the game objects collected.
We thought about this, but after doing some reading we learned projectors tend to take up a LOT of resources, which is something we can't afford on mobile devices.
Also, we weren't aware you can "chop up" pieces of a mesh according to your needs... how does this work? you can access different parts of the mesh in code?
The Unity $$anonymous$$esh class can be modified/queried from scripts (see http://docs.unity3d.com/Documentation/ScriptReference/$$anonymous$$esh.html).
Ray casting + A depth mask would achieve the best results but be a little tricky. Or if you don't want multiple cameras, ray casting with mesh generation (you would probably have to generate a mesh anyway).
Your answer
Follow this Question
Related Questions
Is multithreaded rendering enabled on iOS by default for Metal API since Unity 5.4? 0 Answers
How to render part of an object 2 Answers
Create 'Tippex' for a drawn line. 1 Answer
Object leaves an imprint of its shape in the starting position on iOS. 0 Answers
Why is there no "Render outside safe area" setting for iOS? 0 Answers