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 nowThis Command allows the user to manipulate an object’s transform in the Level. Extra features have been added for more functionality. Please refer to [Insert link to advanced features guide here!!!].
Note |
---|
Reminder: All of the Event Dispatchers we create must match exactly to what is shown in this guide! |
Modifying TransformManager BlueprintAdd
Info |
---|
CVT TransformManager Blueprint Location→ CollaborativeViewer/Blueprints/Commands/Transform/BPs/TransformManager |
In the TransformManager blueprint, navigate to the AddTransformedActor Function
Modifying BP_TransformComponent Blueprint
Info |
---|
CVT BP_TransformComponent Blueprint Location→ CollaborativeViewer/Blueprints/Commands/Transform/BP_TransformComponent |
→ AddActorToTransfomManager_ROS Event
→ RestoreInitialTransform_RunOnserver Event
→ RestoreTransformAll Event
Adding New Logic
→ RestoreTransformAll Logic
→ RestoreInitialTransform_RonOnServer Logic
→ SaveGame Logic
→ UI and Interaction Logic
Now that we have added the necessary Cavrnus Notify Server Boolean to the necessary nodes, ensure the UI options shown below have the value set to True.
Tip |
---|
The Transform Command is now setup! Ensure all blueprints compile and if needed, refresh nodes. |
Auibutton | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|