Megafunk / MassSample

My understanding of Unreal Engine 5's experimental ECS plugin with a small sample project.
MIT License
731 stars 118 forks source link

Initial Draft Pathfinding Sample #19

Closed Fangrelle closed 2 years ago

Fangrelle commented 2 years ago

Initial draft PR for Pathfinding Example .cpp and .uassets.

Fangrelle commented 2 years ago

I might setup the pathfinding process as an observer and make better use of tag switching.

Fangrelle commented 2 years ago

Yeah, ill prob fix that, i think its more inline with ECS.

Megafunk commented 2 years ago

Awesome job making new statetree tasks/evals!!! And you even got the crowd actor BPs working!

A few initial questions after I skimmed it (I might be totally off the mark though so bear with me):

Fangrelle commented 2 years ago

Thanks for takin a look, I haven't touched anything for a bit, but I am aware of 1,2 things with the ECS processors setup that I might want to change and fix. I ended up typing alot, some of this stuff is weird so i listed things.

Fangrelle commented 2 years ago

The MassNavigation module has some avoidance, steering stuff, and it works with the other modules to create a kind of half, localized navigation with ZoneGraph anvigation (uses obstical grid) with a point based pathing system that is used to move along lanes.

I have messed around with the nav stuff in ue4 before, and I think it would actually be nice to link the defualt nav setup and ECS. There is a lot similar logic between the two nav systems traversal (grids (hashGrid), path linking, avoidance) and the actions would align well. I dont think thats a coincidental, prob based on it.

I havent looked deeper into StateTree stuff, but from what i can tell it looks like it could be done, I dont think it would be hard. But I do think I would take a lot of time, it sounds like a whole project, I wouldent be suprised if Epic intends on doing that exactly. The inbuilt AI stuff already has similar kinds of optimization to stuff in zone graph, and the state tree

Normal Nav mesh -> StateTree Plugin -> Mass StateTree stuff

Normal Navmesh AI: image

I think definantly possible, would take a fair bit (mabye alot) of work though (normal nav interfaces can be frustrating to work with in my experience). Not something that I would do at the moment.

Fangrelle commented 2 years ago

Honestly you've got me thinking about setting up the statetree with nav mesh now, not just to link up with stuff like ECS. But because the old Behaviour tree -> StateTree would be so nice...

Fangrelle commented 2 years ago

Cancelling PR, haven't been able to update(time). There is some other relevant content.

Fangrelle commented 2 years ago

I have closed PR, have not had time to update.