Reader small image

You're reading from  Unity for Architectural Visualization

Product typeBook
Published inSep 2013
Reading LevelIntermediate
PublisherPackt
ISBN-139781783559060
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Stefan Boeykens
Stefan Boeykens
author image
Stefan Boeykens

Stefan Boeykens is a Belgian architect-engineer. Starting out as a professional architect in several offices, he returned to KU Leuven in 2000, at the Department of Architecture, for teaching and research, completing his PhD on Building Information Modelling in 2007. Stefan is an experienced researcher with a variety of IT skills. Aside from teaching BIM, he is mainly working as senior Innovation and BIM manager for the Belgian D-Studio, focusing on BIM middleware and consultancy. He is a frequent speaker at BIM-related events and is actively involved in BIM standardization groups, including CEN/TC 442 (Europe) and Belgian Technical Committees. He is father of three boys and enjoys musical composition, reading, cycling and life-long-learning.
Read more about Stefan Boeykens

Right arrow

Triggering doors and elevators


We will now write a simple script that is directly applicable in our example project and extend it afterwards to be more generic and reusable, using parameters.

Doors and elevators are typical interactive elements in buildings. Most buildings have no other moving parts. To rotate a door manually or to use scripting is not that different. However, there are a few tricks to get it correct. These are as follows:

  1. Create a plane GameObject, positioned in the origin. Add a simple Cube, and name it DoorLeaf. Set its position to X=1, Y=1.5, Z=0 and scale to X=2, Y=3, Z=0.1. This ensures that the lower side corner of the door leaf is sitting in the center or our scene.

  2. Load the local documentation from the menu by navigating to Help | Scripting Reference, which opens your default browser on the starting page of the locally installed Unity documentation, which is also accessible offline. On the first page there is a small menu to choose the language of all examples (JavaScript...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity for Architectural Visualization
Published in: Sep 2013Publisher: PacktISBN-13: 9781783559060

Author (1)

author image
Stefan Boeykens

Stefan Boeykens is a Belgian architect-engineer. Starting out as a professional architect in several offices, he returned to KU Leuven in 2000, at the Department of Architecture, for teaching and research, completing his PhD on Building Information Modelling in 2007. Stefan is an experienced researcher with a variety of IT skills. Aside from teaching BIM, he is mainly working as senior Innovation and BIM manager for the Belgian D-Studio, focusing on BIM middleware and consultancy. He is a frequent speaker at BIM-related events and is actively involved in BIM standardization groups, including CEN/TC 442 (Europe) and Belgian Technical Committees. He is father of three boys and enjoys musical composition, reading, cycling and life-long-learning.
Read more about Stefan Boeykens