diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-10-08 15:40:12 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-10-08 15:40:12 +0300 |
commit | ccc7fffb22b347149bf807b9d92677e5616c5017 (patch) | |
tree | 44a3abe1b70e48daacda86ebf77cdc56abd6da0f /indra/newview/scripts/lua/require | |
parent | 8a44149b481bf118d30a457514711c6ba4cf29b6 (diff) |
Lua api to get avatar screen position
Diffstat (limited to 'indra/newview/scripts/lua/require')
-rw-r--r-- | indra/newview/scripts/lua/require/LLAgent.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/LLAgent.lua b/indra/newview/scripts/lua/require/LLAgent.lua index 70f3cdfffb..b2be69dcdf 100644 --- a/indra/newview/scripts/lua/require/LLAgent.lua +++ b/indra/newview/scripts/lua/require/LLAgent.lua @@ -131,6 +131,15 @@ function LLAgent.getNearbyObjectsList(...) return result(leap.request('LLAgent', args)) end +-- Get screen position of your own avatar or any other (if "avatar_id is specified) +-- reply contains "x", "y" coordinates and "onscreen" flag to indicate if it's actually in within the current window +-- avatar render position is used as the point +function LLAgent.getAgentScreenPos(...) + local args = mapargs('avatar_id', ...) + args.op = 'getAgentScreenPos' + return leap.request('LLAgent', args) +end + -- *************************************************************************** -- Autopilot -- *************************************************************************** |