Project Update 1.2

 Cover has now been implemented and can be easily added to the scene using the coverpoint prefab. It is represented as a white wired box in the editor as you can see below:


I've also been doing a few modifications to the code, optimizing it so that the pathfinding doesn't get called as often (I had accidentally set it to be called every time the mouse button was pressed instead of released), added a new button to the pathfinding inspector and created a new script which allows the user to drag the actor and enemies (red boxes) around the level.


With my framework nearly finished, I started experimenting with taking cover into account in the pathfinding algorithm. I started with a really basic technique which adds a cost to all waypoints which are not considered as cover. The red line shows the shortest path while the green line shows the path that favours cover.



The technique is not entirely accurate but it can easily be fine-tuned to fit in with the current level by adding or removing weight on the non-cover waypoints.

No comments:

Post a Comment