StarCraft 2 Attach Dialog To Unit with auto-hide behind UI 2024 download
logo
starcraft 2 mod Attach Dialog To Unit with auto-hide behind UI

Attach Dialog To Unit with auto-hide behind UI

Game Version: -
Total Downloads: 329
Updated: Oct 1, 2011
Created: Oct 1, 2011

Earlier Versions

Name Size Uploaded Game Version Downloads
Attach Dialog To Unit with auto-hide behind UI release 134.91 KB Oct 1, 2011 - 329 download Attach Dialog To Unit with auto-hide behind UI Attach Dialog To Unit with auto-hide behind UI releaseDownload

Description

Share this:

Allows to auto hide dialogs attached to units behind the standard UI.
This trigger requires to know the player's camera distance and angle of view to work correctly.

Note that the map contains a lot of functions to work with vectors, you probably won't need all of them but some are used by the auto-hide function.

This is the 3d model I use (perspective projection):
http://profs.sci.univr.it/~colombar/html_openGL_tutorial/images/perspective_proj_glupers.gif
This model projects a 3d point (game world) into a 2d plane (monitor 2d resolution), if the point is outside the 2d plane then you can't draw it.

Ignore all the other functions in my map, the only one you really need is "Is Dialog Inside Screen For Player"
Others are just useful functions I made for vector modifications, I use them to normalize the system to a 2d model and make the problem easier to solve. You can use them as they are 😉

Here is the drawing I made to calculate if a point is inside the camera:
http://img9.imageshack.us/img9/7492/perspectiveprojection.png

I just used triangle properties and trigonometry (sin/cosin/tan) to detect the violet line size that tells me if the unit is inside or outside the camera (Y axis).

BTW can I ask you why do you need this script? 😉

Comments

Add a comment