Villagers Walking through 3D Meshes

Discuss modding questions and implementation details.
Post Reply
User avatar
Kamer
Posts: 390
Joined: Mon Mar 05, 2018 9:26 pm

Villagers Walking through 3D Meshes

Post by Kamer » Thu Jul 25, 2019 8:53 pm

One thing I notice with the Location Loader from Uncanny is that villagers will completely ignore the laws of physics when new models are present. Anything thats not related to the chunk data they are loaded in seems to be ignored so you'd have villagers just walk through new 3d meshes and buildings. Is there a script I'm forgetting to attach or is this just going to have to be the way it is? It's the biggest reason why I kinda leave anything related to cities unmodified.

User avatar
Interkarma
Posts: 4943
Joined: Sun Mar 22, 2015 1:51 am

Re: Villagers Walking through 3D Meshes

Post by Interkarma » Thu Jul 25, 2019 9:58 pm

Something on my todo list is to add a capsule cast before moving to next cell on navgrid. If something is blocking the way, they will choose another direction. This is for cases like stairs in Sentinel that don't appear on navgrid, but will be also be generic enough to bounce off injected models.

No firm timeframe yet, but likely in next several weeks.

User avatar
Hazelnut
Posts: 1691
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Villagers Walking through 3D Meshes

Post by Hazelnut » Thu Jul 25, 2019 10:45 pm

It might be worth considering using the editor UV is writing to allow easy creation of world data override files (as used by my guild mod) for adding stuff to existing cities / locations. I think the location loader is best suited to new locations, and data overrides to adjusting existing locations from daggerfall data.

If you do this, then the mobile NPCs will avoid everything as it's all being processed by the standard DFU pipeline and don't exist outside as only Unity objects. (assuming I have got the right idea about UVs location loader and how it works, if it is integrated with DFU render code I apologise)

So, unless a new location has mobile NPCs activated you should be fine and not require any capsule cast. Interkarma, I remember fixing the Sentinel stair issue - is there a problem with it then?

User avatar
Interkarma
Posts: 4943
Joined: Sun Mar 22, 2015 1:51 am

Re: Villagers Walking through 3D Meshes

Post by Interkarma » Thu Jul 25, 2019 11:45 pm

Hazelnut wrote:
Thu Jul 25, 2019 10:45 pm
Interkarma, I remember fixing the Sentinel stair issue - is there a problem with it then?
I recall we discussed it, and the outcome of discussion was that I would implement a quick physics check as I mention above. I don't recall any changes actually making it to live code here. As far as I know, NPCs still walk through the stairs on Sentinel castle. Which PR are you referencing? My apologies if I've forgotten the outcome.

Hazelnut wrote:
Thu Jul 25, 2019 10:45 pm
If you do this, then the mobile NPCs will avoid everything as it's all being processed by the standard DFU pipeline and don't exist outside as only Unity objects. (assuming I have got the right idea about UVs location loader and how it works, if it is integrated with DFU render code I apologise)
It will check anything physically in the scene overlapping the navigation space (provided it has a collider to bounce off) no matter how it got there. That's what makes it such a good generic solution. :)

A simple physics check before next navgrid movement is broadest and simplest solution for everyone. Modders will be able to freely place and move objects around towns without going through the process of masking out squares on a disconnected grid every time they move an object. There's no reason the two can't work together, either. All I'm proposing is a complementary refinement to the navgrid movement that checks against scene space also. This directly fixes the issue of NPCs walking through newly injected scene-space objects.

User avatar
Hazelnut
Posts: 1691
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Villagers Walking through 3D Meshes

Post by Hazelnut » Fri Jul 26, 2019 11:29 am

Ah, yes I remember now. I did a simple hack and submitted it, then you said there was an easy general solution which is the one you describe... and will get to at some point. :D All good mate, I just have a bad memory and am wanting to keep a lid on scope creep and unnecessary complexity.

Post Reply