Facepunch / garrysmod-requests

Feature requests for Garry's Mod
86 stars 24 forks source link

Return material at position #1326

Open copperwarrior opened 5 years ago

copperwarrior commented 5 years ago

I'm working on an addon which requires me to find reflective surfaces on brushes and entities. A function that could return the material or iMaterial at one position of a model would be helpful for achieving this, as I have found no other method of doing so.

Kefta commented 5 years ago

You can perform an unswept trace in the position you want the material from and use the HitTexture key. This won't work for studio models, though.