PickAtCursor
function · ui · orchestration
- Address
0x481190· 535 bytes, up to0x4813a6- Meaning
- Builds the pick ray, traces it with the flag word and caches the picked GUID
- Confidence
- verified, proof one
- Finding
- ui/worldpick#what-the-pick-returns
Finding: What the pick returns in ui: the world pick
0x481190(cursor position, out) returns 0 at once when the flag word is 0. Otherwise it stores the ray's origin at out+0x18 and far point at out+0x24 on every call, and calls 0x480df0. That traces the terrain segment (0x672170; collision mask 0x1000114, or 0x10f0114 with flag 0x2) and, only when the flag word has any of the bits 0x7c, the object candidates (0x480a50). The nearer wins; a tie or an unordered compare goes to the object.
An object hit returns 2 with its GUID at out+0 and its point and distance; a terrain hit returns flag bit 0 as the state (1 or 0); no hit returns 0.
The derivation is in the doc.
Callers 2
Callees 9
- ReleasePickNodes ui
- TracePick ui
- BuildPickFlags ui
- CGWorldFrame::ScreenPointToRay ui
- 0x511c50 uicamera
- SetDeviceProjection gx
- SetDeviceView gx
- GetDeviceProjection gx
- GetDeviceView gx
Calls and jumps by a bare address, from tables/calls.tsv.