From the course: Unity: AR Visualization 03 Complex Interactivity

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Syncing movement

Syncing movement - Unity Tutorial

From the course: Unity: AR Visualization 03 Complex Interactivity

Start my 1-month free trial

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…

Contents