Facepunch / garrysmod-requests

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

Ability to rotate decals #1918

Open Ramalayha opened 2 years ago

Ramalayha commented 2 years ago

It would be nice to have an argument to util.Decal/DecalEx for how many degrees to rotate the decal so they're a bit more flexible.

UAVXP commented 2 years ago

Rotating/scaling decals are overlays in Hammer. Though you can use cam.Start3D hackery in your stuff

ZH-Hristov commented 6 months ago

This is pretty late to the party, but you can rotate them in DecalEx. It just depends on the normal you give it. Although you gotta be careful as it's easy for the decal to somehow clip into the ent.

ZH-Hristov commented 6 months ago

https://github.com/VSES/SourceEngine2007/blob/43a5c90a5ada1e69ca044595383be67f40b33c61/se2007/engine/r_decal.cpp#L35

Perhaps this would need to be exposed?

Ramalayha commented 6 months ago

To clarify; I mean rotate it around the axis of the normal you provide. Take the mouth decal for example, it will always appear as a smile when placed on a wall. There is no way to turn it upside down into a frown or any other orientation. You can put it at an angle on props by rotating the prop before applying it but you can't do that with the map and it's a silly way of doing it. I have no idea if valve bothered to implement a way to rotate decals like that but I can always hope.