Screen to World Projection Example Map v1.1

Details

  • Filename
    UI_Screen_To_World_Projection.SC2Map
  • Uploaded by
  • Uploaded
    Feb 25, 2011
  • Size
    91.98 KB
  • Downloads
    536
  • MD5
    6981654e482b6db763daacfdee22373f

Changelog

Optimized Code, runs much faster.

Added an initialization function that must be run every time camera position/orientation changes.

Controls

Right click: mouse free look (changes Yaw/Pitch)

Q/E FoV

W/S Distance to target

A/D Roll

Mouse side buttons: height offset

UI to World only works properly on flat terrain

Bugs out at Yaw = 0

World to UI needs camera smoothing to be OFF to work properly on bumpy terrain

Both functions need to know Screen Resolution

Return value from World to UI is in units of resolution. Needs to be converted to UI units to work with dialogs. Can use either the provided resolution detection method or getResolution library (not tested).