Game Development Community

Finding the Terrain texture at a location in game

by Kevin Bamonte · in Torque Game Engine · 09/02/2008 (5:50 am) · 5 replies

Is there any way to tell which terrain texture is being used at a players position in game ?

thanks in advance

kevin

#1
09/11/2008 (10:23 am)
In the terrains folder, there is a cs file where the contents speak of mapping sounds, etc to textures - i just started, but when i was poking around in the files i saw it
#2
10/05/2008 (9:06 pm)
Your question is a bit vague. Do you mean:

a.) You want to find out what textures are being used on the current terrain so you can find them and change them? This can be found by pressing F11 in a mission and then choosing Terrain Painter from the Window menu. This gives you the textures in use for the current terrain. Also, these folders can be found in the game/scriptsAndAssets/data/terrains/, where is the type of texture you are looking for.

-OR-

b.) You want to find the texture the player is standing on for some event or scripted purpose? As Rad said, there are propertyMap.cs files in each of the individual terrain folders which defines sound properties for given terrain materials.
#3
10/20/2008 (4:58 pm)
Hey thanks for the reply back guys !

to be more specific "b" (from Travis's reply) is what i'm trying to do but i've looked at the propertyMap.cs file you both suggested and don't see the connection to what i'm trying to do ... that seems to deal with sounds ...

am i missing somethign here ?

thanks in advance -

kevin
#4
10/21/2008 (5:14 am)
Kevin, have a look at this thread. It's engine side code, but should give you access to all the information you need.
#5
10/21/2008 (8:30 am)
Gary - thansk for the response, much appreciated .... can this be done at all within scripting (that's really what i'm looking for) ?

kevin