Let’s apply In this tutorial, we will take a closer look at the No-Code Collaboration Sync Material component to a real world example.
Starting Project
We are going to begin with a simple outdoor scene with an interactive carThis scene presents a car model with several interactive features. In this tutorial we will be focusing on swapping the base color texture to change the car’s paint body color.
A sports car with 5 available color schemes.
A HUD with 5 buttons corresponding to the 5 color schemes.
No special game logic other than modifying the paint material based on which button is selected.
No physics applied (see: Sync Property Components and Physics)
Cfm tabs page | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
Setting up Cavrnus in UnityAs described in the Setup Your Scene guide, we will setup our Scene for Cavrnus using the dropdown button. Then, as described in that same page, we will set the Cavrnus Spatial Connector to use our server, Login to our account automatically, and Automatically Join a “Chess” space we created in the web. Add Sync Components to Chess PiecesNext we will simply select all the pieces and Add Component Sync Transform in the Inspector. And we’re done! That’s it! OK, Let’s Add a Custom Avatar for FunAlright, the Cavrnus Spatial Connector comes with a default Avatar, but if you wanna be a bit fun you can Add a Custom Avatar. In this case we’ve already found a fun 3rd party Floating Orb Avatar. Like in the Developer Guide, we’ll start by just giving it a Sync Transform component, like we did the Chess Pieces. Then, in the Cavrnus Spatial Connector, we will set the Remote User Avatar to be this. And now we’re actually done! Final ProductWith the Sync Transform components added, the Avatars and Chess Pieces will move in a synchronized way for both users. This, combined with Voice and Video, will let you play a chess game with whomever else launches this scene! | ||||||||||||||||||
Cfm tabs page | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
Installing the Cavrnus Plugin (Unreal Engine)As with any Unreal plugin, adding the Cavrnus Spatial Connector is a simple 3 step process:
Initial Cavrnus Setup
Verify user Copresence Components
Add Sync Components to Chess Pieces
OK, Let’s Add a Custom Avatar for FunAlright, the Cavrnus Spatial Connector comes with a default Avatar, but if you wanna be a bit fun you can Add a Custom Avatar. In this case we’ve already found a fun 3rd party Floating Orb Avatar. Like in the Developer Guide, we’ll start by just giving it a Sync Transform component, like we did the Chess Pieces. Then, in the Cavrnus Spatial Connector, we will set the Remote User Avatar to be this. And now we’re actually done! Final ProductWith the Sync Transform components added, the Avatars and Chess Pieces will move in a synchronized way for both users. This, combined with Voice and Video, will let you play a chess game with whomever else launches this scene! |