Archaegeo / DualUniverseLuaIssues

DualUniverse LUA Issue Tracking
GNU General Public License v3.0
5 stars 0 forks source link

3D Transforms for the Screen API #15

Closed EasternGamer closed 2 years ago

EasternGamer commented 3 years ago

Simply... a way to rotate things in a 3D way using the screen API. A use-case I would have, should it come to the HUD, would be the transformation of text as there is no simple way to do that.

Archaegeo commented 3 years ago

Is this a repeat of your other comment?

EasternGamer commented 3 years ago

Is this a repeat of your other comment?

No, this is for the new Lua API for screens on the PTS. I don't believe they've added it yet.

NQ-Deckard commented 3 years ago

You should be able to require vec3, vec2 and quat libraries into the lua screen units now. Similar to the way the json lib is done in the example which uses programming board and screen communication.

Archaegeo commented 3 years ago

Eastern, verify and if good I will close this

EasternGamer commented 3 years ago

You should be able to require vec3, vec2 and quat libraries into the lua screen units now. Similar to the way the json lib is done in the example which uses programming board and screen communication.

It's not quite what I was suggesting, since some elements just aren't really possible to rotate in any meaningful way. For example, I can't rotate text in a 3D way. Of course, for screens this is hardly much of a use case, but for when it reaches the HUD, this will essentially be very important.

So, the current use case could be pseudo-3D animations. If you wanted to have circles rotated which move up and down, there is no way you can do a partially rotated circle about X plane. (About the X plane would turn the circle into roughly an oval, but not exactly)

You would need to provide a FOV and near value, I believe, to do the transformation properly. Size scaling can be done using ordinary Lua relatively easily.

Edit: I noticed you commented on the other issue thread, in which case then yeah, I just would say it needs to be done at some point because I can think of quite a few uses that this turns a 5/10 into a 9/10 player-made screen.