Game Development Community

Doors and Windows

by Jason Chadwick · in Constructor · 06/24/2009 (2:15 am) · 2 replies

What is the best technique to creating doors that are controlled by in game programming ( open, close, lock etc ).

Also can we place almost transparent windows in a hole in the wall as well as a portal?

#1
06/24/2009 (3:28 am)
1. With a DTS mesh model, you can't script a DIF.
2. Yes, as long as they are set to detail, though they will still cause collision. If you want to shoot through them, either leave the space open with just a portal or place a DTS model of a window without a collision mesh there.
#2
07/04/2009 (1:45 am)
1. Use a DTS for the door, probably a StaticShape Object and you will have to move it through transformational math. So cast a rayCast from the player's eyeVector and see if it hits the door. Using the doors handle(Id not the literal handle, forgot we were talking about doors), then rotate it through TorqueScript. Otherwise using a pre-Animated opening door will most likely not work. Collision Mesh issues. Check out "Advanced 3d Game Programming All in One" by Kenneth C. Finney. He wrote extensively on the subject. And its all done in TorqueScript.
Or: www.garagegames.com/community/resources/view/4004