From the course: Unity: AR Visualization 03 Complex Interactivity
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Syncing movement - Unity Tutorial
From the course: Unity: AR Visualization 03 Complex Interactivity
Syncing movement
- [Instructor] Alright, we're finally ready to move some stuff. Let's go to the NetworkManager if you're not there already, we're going to go take what we did for visibility, so ProcessMessagePartVisibility, and I'm going to duplicate this. I'm going to call this ProcessMessagePartMove. Before I forget, I'm going to go put that into my main process message, and I move. Be sure to add in the message data, and now I'm going to head back to my move function. So I still need the sender, that works, I still need the partUID, but I don't need the visibility, I need a Vector3, so I'm going to start by going Vector3 position is equal to new Vector3, and then I'm going to grab my message data, remember, I'm sending through the X, Y, and Z floats, so message.GetFloat, so we're starting from two, that's my X data, and Y data, my Z data, so let's change this to three and this to four. So I have my position data, I…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
Create sync UI, state, and methods5m 45s
-
(Locked)
Creating your network manager5m 48s
-
(Locked)
Connecting to PlayerIO7m 42s
-
(Locked)
Starting a multiplayer connection5m 27s
-
(Locked)
Testing your multiplayer connection5m 51s
-
(Locked)
Creating a message handler6m 30s
-
(Locked)
Processing the join message4m 41s
-
(Locked)
Working with world state3m 51s
-
(Locked)
Sending hide messages10m 34s
-
(Locked)
Making your parts relative7m 35s
-
(Locked)
Syncing movement4m 39s
-
(Locked)
Syncing the addition of notes5m 44s
-
(Locked)
Syncing the deletion of notes6m 39s
-
AR app in action2m 9s
-
(Locked)
-