Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

For this command, we will utilize event dispatchers from which our AC_Cavrnus_SyncMove script will bind to. Adding event dispatchers 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.

  1. Locate the Level Blueprint by using the shown dropdown below.

...

  1. In the Level Blueprint Event Graph, add the following CavernizeLevel. No inputs/outputs are required for this function.

...

  1. 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.

...

  1. Finally in the Event Graph, add the following space connection logic and call the CavernizeLevel function when connected.

...

BP_BasePawn

  1. Add AC_Cavrnus_SyncMove to BP_BasePawn

...

TransformManager

  1. Add an event dispatcher to broadcast changes made to the ModifiedActors array.

image-20240613-230155.pngImage Removed

image-20240613-230211.pngImage Removed

  1. 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.

image-20240613-230658.pngImage Removed

image-20240613-230709.pngImage Removed

  1. Lets repeat the same process but in the BP_TransformComponent.

image-20240619-154448.pngImage Removed

image-20240619-154710.pngImage Removed

  1. Call the newly added event from the following pieces of logic.

image-20240619-154517.pngImage Removedimage-20240619-155317.pngImage Removed

Transforms are now synced!

...