Root Motion and Wolf NPC
The pathfinding system is implemented and ready to navigate some NPCs around the world. The movement itself is a combination of rootmotion and steering behaviors.
After calculating the desired direction a movement controller sets the corresponding values for angle and speed of the animator. This way the NPCs move very natural and smooth and don’t slide over the ground as much as before.
However, many animations on the server are a big impact on performance so we have to optimize a lot. Therefore I started to implement a level of detail system for the AI which disables some components of agents which are not in close proximity to players. It reduces their update calls on the server and simplifies the motion and AI itself for example.
As a first prototype we have a new wolf NPC which uses the new pathfinding system, rootmotion and lod-system.
More dirt
We added some more dirt to abandoned places.
Housing/Building
This week I started my work on an exciting new feature which feels really great working on after all the performance optimizations of the past weeks. The performance currently still isn’t optimal, but the next step needs to be done by another member of the team.
The feature I’m working on is our housing / building system which I planned the last weeks. In order to speed up the development we are using uConstruct which can be bought in the asset store of Unity3D. Even though a lot of the work is already done I guess the entire system will occupy me at least for one to two month till it’s in the state I planned. I started with using the system to make it possible to place campfires or other objects into the world. Before campfires would always be placed some meters in front of the player which was bad because the player had no real control of its position. If the player wanted to, it would have even been possible to place them inside other objects.
The great thing about the new system is that it isn’t only working for campfires but for every object we want to mark as a “placeable” which comes in pretty handy for future integrations like a workbench. You can see the current implementation in the following video.
After everything was up to snuff I started thinking about how I could roll out incremental builds of our housing system. I ended up splitting it into three distinct phases:
- Phase 1: Integrate the building part locally (this is more for internal testing)
- Phase 2: Integrate network-side without the blueprint editor.
- Phase 3: Integrate the dedicated blueprint editor.