|
|
Example of a door that opens and closes with one click:Some people have asked how to make a door which opens and closes. This is a simple example, it would be easy to get more elaborate. The idea is to make a door, then add it to an animation, and then add a touch sensor
which makes the door open (runs the animation). Here is a snapshot of the final product.
OK, did it work? I hope so. As an exercise you can give the door a nice wood grain or a steel and rivets texture. You can change the length of time of the animation to make it slower. You could use a proximity sensor to open the door when the user gets near the door and then close it when the user walks away (sorta like in the supermarket). You could have two animations, one to open the door when the user approaches and another to close it when they pass through it (see below). You could have two swinging doors (like a saloon door). You could have a sliding door (pocket door). Here is a link to a .spz file which I built this example with. It may help you to download it (right click on link and do a "save target as...") and examine it in Flux Studio. Last, but not least, here is the door as a VRML world.... An example of a click once to open, click again to close door:Some people want a door that opens when you click on it once, and closes when you click on it the second time. Here is how Keith explains how to make this happen. Hi: Here is his example door2.spz file For a touch of overkill; here is a link to the VRML .wrl of a door that our friend Duc Pham Hi made. OK, one last example: enter area to open, leave area to close.Some folks want a door that opens and closes by itself like at the supermarket. This can be done by two animations and a proximity sensor. One animation starts with the door closed and ends with the door open. The other animation starts with the door open and ends up with the door closed. You add a sensor which runs the first animation when someone enters the area, and runs the first animation when they leave the area. Proximity Sensor Properties You hit Add Trigger, then select an animation on the Tree window. Then hit Add Trigger again and select the second animation from the Tree window. If you select the Open Animation, then on the pull down box below you select When the Sensor Region is Entered, the triggered Node will Start at the beginning. Then go back and select the Close Animation. Make the statement below it read Region is Exited Trigger Node will Start at the beginning. A view of the proximity sensor box. Here is an example of the VRML and here is the door_prox.spz file for you to look at. |
|