Get screen bounds of an actor

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
argv
Posts: 184
Joined: Tue Aug 30, 2016 4:47 pm

Re: Get screen bounds of an actor

Post by argv »

Graf Zahl wrote:I know people won't like what I'm saying now, but doing any unprojection from the 3D view to the 2D screen on the script side is a dangerous thing.
I'm aware. This is already visible in the current engine: the brackets are incorrectly positioned when using the classic software renderer (but not GL or softpoly).

What do you suggest? There is no ZScript API for determining if/how/where an actor is projected onto the screen, as far as I can tell. How else is HUD code supposed to figure that out?
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Get screen bounds of an actor

Post by Major Cooke »

Indeed. This is all we have so far and it's the closest solution.

Gutawer: There is one place where the four corner projection system is not going to work: tri-corner HUD elements. Is there any way your system can accommodate just a singular image?

Image
Post Reply

Return to “Scripting”