Jump to content

Two issues with sprites


IceBurger
 Share

Go to solution Solved by Josh,

Recommended Posts

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:

image.thumb.png.6781c7a165798961e0da02458591e7ef.png

and here is a screenshot of the game (after pressing run):

image.thumb.png.b26abc0a12008fc4a14f58fa9ba28337.png

 

Also, are sprites an appropriate way to implement a game menu?

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

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.

  • Like 1

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

  • Solution

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.

  • Like 1

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...