From the course: Unity: AR Visualization 02 Basic Interactivity

Unlock the full course today

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

Anchoring the part UI to the world

Anchoring the part UI to the world - Unity Tutorial

From the course: Unity: AR Visualization 02 Basic Interactivity

Start my 1-month free trial

Anchoring the part UI to the world

- [Instructor] There's one thing that we still have to do with our part UI, and it's to have it linked to the real world. We've saved off the world position, now we need to use that. Now, we're going to be converting from the world objects into our UI space, using cameras. So we need to make sure that our UI camera is tracked. So let's go to our UI manager. Expose a field here for our camera. And go public. Camera. And we can call this a camera. All right, so we've got that tracked. And we'll be able to reference it, using the instance. So let's go back to the part UI. So we need to make a method to position things, and so intuitively we're going to call that method position. It doesn't need to be public, so we're going to make it private. I'll call it private. Void. Position. So taking in any parameters. Okay, so the first thing we want to do is convert from our world position into a position that we can then…

Contents