IceBurger Posted October 30, 2023 Share Posted October 30, 2023 Hello, I'm thinking about playing around with making game menus in Ultra, so I started with a sprite. I noticed two issues right away: 1. [MINOR] You must click precisely the center of a sprite to select it in the editor. Clicks anywhere else on the sprite do not do anything. 2. [LESS MINOR] The position of the sprite in the editor does not match what is rendered in game. Here is a screenshot of the editor: and here is a screenshot of the game (after pressing run): Also, are sprites an appropriate way to implement a game menu? Quote i now hate love C++ Beeeeeeeeeeeeeep~~This is a test of the emergency signature system~~Beeeeeeeeeeeeeep RX 6800XT | i5-13600KF | 32GB DDR5 | 1440p is perfect Link to comment Share on other sites More sharing options...
Thirsty Panther Posted October 31, 2023 Share Posted October 31, 2023 Ultra Engine does come with GUI. https://www.ultraengine.com/learn/GUI?lang=cpp 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted October 31, 2023 Share Posted October 31, 2023 Something important to understand with sprites is they don't have any rotation on the CPU side...the sprite facing code only executes in the vertex shader. The reason for this is that their rotation is always relative to a camera, and there may be multiple cameras rendering the same sprite, and rotating it differently for each camera isn't possible. So the concept of a world Pick operation intersecting the rotated mesh doesn't make sense, because that rotation has to be defined relative to something. This is why sprites use a sphere collider for picking. I could adjust the radius of the sphere collider, but it is still a round shape around the center of the sprite that can be picked. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Solution Josh Posted October 31, 2023 Solution Share Posted October 31, 2023 The sprite handle/offset issue can be demonstrated in the editor just by loading a map that has a sprite in it. I have uploaded a fix for the editor on the .dev channel. A build of the static libs and Lua binaries will be available later today. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.