top of page
Search

Some progress on Dynamic Surface Navigation plugin

  • Writer: Paul Swarrow
    Paul Swarrow
  • Jul 20, 2023
  • 2 min read

Virtual Area Layout

Have made the layout system for virtual navmesh area:

Ship projections are created in specified area dynamically in runtime.

Ship size is measured in NavMesh Tile size units from NavSystem settings. When a new ship registered - system searches for empty place for the calculated volume.

Then the projection is created.


While it sounds simple enough, there was a tricky moment with UE lifecycle:

Spawning is restricted within constructor but nominally it is allowed in the BeginPlay event.

But funny thing is that BeginPlay is called within the base class constructor if you drag and drop an actor from Content Browser.

It is also the case if you change properties in the Details Panel - it causes object reconstruction and BeginPlay is called from constructor again.


Had been confused a lot by this. Though it is not really an obstacle - I managed to make area to track object creation and spawn projections in it's one tick outside of the constructors.


Fun stuff

Moving towards cool features.

Now you (you who, I am alone here) can place a physically simulated object on the ship and it will be projected to the ship's projection. So it will influence pathfinding on the ship.

It can be also projected over several ships at the same time. Fallen mast? Maybe. But there is an obvious issue with this - projections that extend too far will mess with each other in the virtual area. Maybe some cutting off can help but it is to advanced for now.

I actually have to decide at what moment I will try to publish this thing.


Still don't know if I actually can publish it. The solution it self though is useful - looks kinda like a dirty trick.


Well, at least now I know for sure that I can create moving objects on the ship.



 
 
 

Commenti


Pagan Games

©2022 by Pagan Games. Proudly created with Wix.com

bottom of page