For this command, we will utilize event dispatchers from which our AC_Cavrnus_SyncMove script will bind to. This is not mandatory, but merely a way to prevent the blueprints from being cluttered with repeated node logic.
Level Blueprint
In order for the objects in the space to be properly synced, we must mark them as sync-able. Lets do this programmatically.
Locate the Level Blueprint by using the shown dropdown below.
In the Level Blueprint Event Graph, add the following CavernizeLevel. No inputs/outputs are required for this function.
Add the following logic to the newly created CavernizeLevel function, which finds all Actors in the level, adds a SyncWorldTransform and CavrnusPropertiesContainer along with setting the mesh to movable.
Finally in the Event Graph, add the following space connection logic and call the CavernizeLevel function when connected.
BP_BasePawn
Add AC_Cavrnus_SyncMove to BP_BasePawn
TransformManager
Add an event dispatcher to broadcast changes made to the ModifiedActors array.
In the same TransformManager blueprint, locate the AddTransformActor function and add the shown logic in green. Notice here we are making use of the event dispatch.
Lets repeat the same process but in the BP_TransformComponent.
Call the newly added event from the following pieces of logic.
Transforms are now