Surface properties?
by John Vanderbeck · in Torque Game Engine · 09/01/2003 (7:06 am) · 9 replies
We just purchased Torque, so obviously we are still trying to learn the ins and outs of it.
Anyway, a few of our levels will require special handling of the surface properties from the terrain. A good example is we have one level that has slopes of ice on it, and we need any player who walks on them to slide down.
I have not managed to find anyway to set the properties of different surfaces in the terrain editor. Basically I need to be able to somehow flag certain areas for special things like "Ice".
Is anything like this built in already or are we goign to have to make some big changes to the engine?
Anyway, a few of our levels will require special handling of the surface properties from the terrain. A good example is we have one level that has slopes of ice on it, and we need any player who walks on them to slide down.
I have not managed to find anyway to set the properties of different surfaces in the terrain editor. Basically I need to be able to somehow flag certain areas for special things like "Ice".
Is anything like this built in already or are we goign to have to make some big changes to the engine?
#2
Basically, yes, it's very feasible with the existing infrastructure.
09/02/2003 (10:04 pm)
Torque has the ability to tie properties to surfaces in-game; in general the texture is tied to the properties. So you'd have an ice texture that had that property...Basically, yes, it's very feasible with the existing infrastructure.
#3
A simple test to verify this is to create a map with three textures and assign each texture a unique footpuff color in the materialmapping. Only the first color defined will be used regardless of texture.
09/02/2003 (10:08 pm)
That functionality only works with interior objects. The code for it to work with terrains is NOT working as of the last time I looked at it.A simple test to verify this is to create a map with three textures and assign each texture a unique footpuff color in the materialmapping. Only the first color defined will be used regardless of texture.
#4
09/03/2003 (8:31 am)
So it is looking like our best bet is to simply create an invisible object we can place at designtime, then query for that at runtime?
#5
09/03/2003 (9:26 am)
Someone needs to review the material properties code for terrains. Fixing the missing or broken code would be the ideal choice.
#6
09/03/2003 (11:30 am)
I agree with Lab. The infrastructure for that is there; it just needs to be fixed up a bit.
#7
09/03/2003 (6:39 pm)
Point me in the general direction and i'll look into fixing it
#8
in:
engine/editor/terrainActions.h
engine/editor/terrainActions.cc
engine/editor/terrainEditor.h
engine/editor/terrainEditor.cc
engine/terrain/terrData.h
engine/terrain/terrData.cc
I'm sure there are a few other places... but it's been a while since I tried mapping out the source code on it.
09/03/2003 (9:33 pm)
MMaterialGroups / Material / mMPMIndexin:
engine/editor/terrainActions.h
engine/editor/terrainActions.cc
engine/editor/terrainEditor.h
engine/editor/terrainEditor.cc
engine/terrain/terrData.h
engine/terrain/terrData.cc
I'm sure there are a few other places... but it's been a while since I tried mapping out the source code on it.
#9
09/04/2003 (8:19 am)
Thanks i'll start tracking it down. Could someone show an example of how it would be used if it worked correctly so I can duplicate it?
Torque Owner Steve Boris
here is the link
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3615
hope it helps