Game Development Community

Almost there

by Kevin Johnson · in Torque Game Engine · 03/12/2004 (7:06 am) · 1 replies

OK ive almost got the engine where I want it for my project (daylight/shadows from almost everything, most of the other lighting patches/fixes etc..). Just a couple of outstanding issues.
Are these doable..
can i use a area trigger (onEnterMissionRegion )to set some kinda of flag in shapebase or elsewhere like isInside so that I can turn off (or move outta the way) shadows (from the sun) cast by the player while in an interior? - (it looks kinda stoopid having my guys shadow move with the sun while he is inside an interior.)
edit:
n/m i did some digging and found the solution to this one..
www.garagegames.com/mg/forums/result.thread.php?qt=12588

can I wrap the exteriors of interiors with a dts to cast moving shadows on the terrain (simular to the way my trees work)? If so what are the performance gotchas i need to look out for?

Thanx guys

#1
03/12/2004 (8:39 am)
I don't know all the shadow differences between DTS and DIF, but I've successfully gotten DTS "shells" around DIF objects, and I recommend you use DIF collision meshes if you're going to go that route, as it's easier on the fps. The collisions for DTS shells usually cover the doorway, and lock the player out(something I learned the hard way, lol). Also, since the collision DIF is invisible, you can make it without any details you don't absolutely need(just a rough shape approximation).

As for shadows being inside the interiors, sounds like you should dig into that code and put a check to see if the player is inside a building, and if so, just turn off shadows by way of a boolean value, or something along similar lines.

Hope that helps.