Reposting from
TF2Maps.net:
I'm trying to implement a "preview mode" in my
resizable sprays plugin where users can see just how large their spray will become when placed on a surface.
I have a demo of what I have been able to create so far:
https://www.youtube.com/watch?v=RpbGUZmruhY
This approach uses an env_sprite_oriented entity that gets teleported to the user's crosshair. While the sprite has a scale keyvalue, I am only able to get the sprite to scale in-game at increments of 0.25, starting from 0.375. This means I effectively cannot preview how one's spray will look at precise scales.
What do I need to do to get the sprite to scale properly?
I can't change the VTF (image file) since the images are user-uploaded sprays and can vary in actual dimensions. The VMT file is being written and precached dynamically, but only one material is being used for the sprite preview.
If I set "m_bWorldSpaceScale" to 1 on the env_sprite entity, I can get it to scale more accurately. However, the scale factor only goes up to 64x64 Hammer units due to
a hard-coded value. Is there any way to bypass this?