Orientation of SurfaceGuis is wrong

This SurfaceGui is on the Top face of the part, but for some reason the default orientation of the SurfaceGui is twords the Right face of the part, instead of the Front. This means that SurfaceGuis are inconsistent from Decals, which DO face forwards

This also means that if you translate Worldspace coordinates to 2D coordinates, they get rotated.

https://i.gyazo.com/57df11af299ac16a01b7f30f85d35dae.mp4

Obviously this is easy to work-around but if it could be corrected on the engine side that would be great

17 Likes

This is unfortunate. Fixing this would break games that rely on this behavior.

7 Likes

Yeah I was thinking about that, even just right now, I’m certainly not going to wait for a fix to continue with my game, so my own game would be broken (although not hard to fix) if it does get fixed

I was thinking of a possible way to solve this, it’s probably not ideal but perhaps the “Rotation” property from GuiObject could be added to SurfaceGui? Then there’s an avenue for keeping things (generally) working retroactively. I’m not sure how many people are using SurfaceGui’s the way I am right now, so I’m curious of how big of an impact such a change would really make on existing games.

It’s a shame this wasn’t noticed sooner :zipper_mouth_face:

7 Likes

I think a possible solution to this would be to have a property under SurfaceGUIs - that tells the SurfaceGui to face the front. It’d be a bool value, and this would ensure that legacy games aren’t broken.

2 Likes

Could use an Enum instead of a bool that would allow the SurfaceGui to point in all 4 directions and just have it default to pointing to the right.

3 Likes

I was thinking about this too. It would be a strange edge case to have though, and I’m not sure that an API proposal for such would end up passing.

Opinions on best workaround?

  • Rotate part orientation to use Front surface of part instead of Top surface
  • Use artificial X,Y values for Position and Size of SurfaceGui children to pretend desired orientation (towards Front)
  • Additional Part child dedicated to holding this SurfaceGui on its own Front
  • Other?