- Home /
This question was
closed Mar 24, 2014 at 09:06 AM by
fafase for the following reason:
Duplicate Question
Question by
LlamaNervous · Mar 24, 2014 at 08:52 AM ·
textureterrainifterraintexture
Get texture from terrain.
I was wondering if there was a way to get what texture painted onto the terrain the player is walking on? I made a few scripts to play different footstep sounds determined by the terrain the player is on. The script uses trigger boxes that are put on the different terrains. When the player enters a trigger box a bool gets ticked like onGrass or onDirt and that is accessed in another script to play different sounds when walking.
I just wanted to make it easier and not have so many triggers in the scene. So if there is a way to get what texture the player is walking on and use that as an if or something that would be helpful :)
Comment