Field Of View 2D allows to create visually represented fields of view for AI units.
An approach for this 2D field of view based on ray tracing and may not be efficient if there will be more than 10 instances on a screen at once. But it may be ideal for small games and prototypes.
Actually, if someone needs to implement this, you know, make it more efficient or some customization, you can always contact me: dima.kurilchenko@gmail.com
skype: dima.kurilchenko
I am working as a freelance developer and looking for interesting projects.
No, it is not mine, but yeah it looks pretty similar to mine, it is also based on ray tracing and a vision cone represented by a mesh, as I can see in a live-demo: http://www.sparkpluggames.com/spgtools_visioncone.htm
Excellent work! Exactly what I needed to test a prototype I’m working on.
One (hopefully small) question: If I set the FOV Angle to 360, it leaves one segment ‘open’ as if it didn’t join the first and last tri to create the final one. Is this an easy edit? Please forgive the newbie-ness.
At this point you will have a cone like this:
One problem is that the mesh doesn’t has polygons at the bottom in the current FOV2D thing.
In order to make a two sided mesh you should make changes in a UpdateMesh method in a FOV2DVisionCone class. Basically it means that there would be 2x more vertices (and faces) where a second half would represent a bottom. Remeber: a clockwise order goes for upper faces and a counter-clockwise goes for back faces.