From the course: Unity: Architectural Visualization Interactivity
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Script object interactions - Unity Tutorial
From the course: Unity: Architectural Visualization Interactivity
Script object interactions
- [Narrator] In the previous movie, we created the interact objects script which we attached to the door. And this script can be attached to many different types of interactive objects and it's purpose is to change their color to highlight them and indicate they're the kind of thing we can click on to initiate a response. But of course we still have the functionality itself that needs to figure out when are we close enough to a highlight? When are we close enough to an interactive object that we can initiate it's behavior? To code that functionality, we're going to make a new and separate script file. I'm going to bring back the assets to import folder included inside the exercise files. And the file in particular is the object selector.csharpscript. I'm going to drag and drop that into the project. This script should be attached to the player camera or the viewer's camera. It's purpose is to figure out when we're near…
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.