
Terrian 3D: Doing in game actions based on the texture the character is standing on
Terrian 3D: Doing in game actions based on the texture the character is standing on Enhance gameplay by triggering actions based on terrain textures. Use Terrian3D to fetch texture IDs at the player’s position:
get_texture_id() returns a Vector3 containg Vector3(base texture id, overlay id, blend value).
@export var terrian:Terrain3D) func _physics_process(_delta: float) -> void: var texture_pos: Vector3 = terrian.data.get_texture_id(PlayerManager.get_player().get_position()) print_debug("Texture ID: {0}".format([texture_pos])) var base_texture_id = int(texture_info.x) # Base texture ID (e.