1. #1

    Stereoscopic 3D - Get Mouse Icon Depth or Adjust Global UI 3D Depth?

    When running in Steroscopic 3D mode with the mouse in software mode the mouse will auto-adjust it's depth to the depth of what it's over in the game world.

    This is great and all, but the problem I'm finding is that the UI as a whole just sits right on the screen which makes looking at UI elements quite hard with double-vision resulting from looking "past" the UI.

    I'm trying to find a way to adjust the UI to where the mouse is so I'm curious if there's either a way people know of to adjust the whole UI depth, and/or get the depth of the mouse.


    Thanks for any help you can give me!

  2. #2
    Deleted
    Technically, frames actually have a Depth property, but as most authors don't run 3D setups themselves, this property is rarely (if ever) used.

    As for the UI dynamically adapting its depth to the game world, that won't be possible - the 3D game world isn't accessible to UI code, and there does not appear to be any flag for telling the game to dynamically adjust the frame's depth.

    - - - Updated - - -

    Didn't see the part about adjusting the entire UI. You could try the following, no guarantees:

    Code:
    /run UIParent:SetDepth(10)
    Play with the value until you get something that suits you.

  3. #3
    Quote Originally Posted by Treeston View Post
    Technically, frames actually have a Depth property, but as most authors don't run 3D setups themselves, this property is rarely (if ever) used.

    As for the UI dynamically adapting its depth to the game world, that won't be possible - the 3D game world isn't accessible to UI code, and there does not appear to be any flag for telling the game to dynamically adjust the frame's depth.

    - - - Updated - - -

    Didn't see the part about adjusting the entire UI. You could try the following, no guarantees:

    Code:
    /run UIParent:SetDepth(10)
    Play with the value until you get something that suits you.
    I was planning on doing something like that, but I was hoping there'd be some way to get the actual depth of the software mouse (as it obviously has to have a depth property somewhere for it to be able to move between near/far settings) so that I could auto-update the depth of the whole UI to match where the mouse was.

    That in turn would let me use peripheral vision to see my UI elements without having the super annoying doubling that comes with attempting to see something closer to you than where you're focused. (Which is my main complaints with games).

  4. #4
    Quote Originally Posted by Brusalk View Post
    I was planning on doing something like that, but I was hoping there'd be some way to get the actual depth of the software mouse (as it obviously has to have a depth property somewhere for it to be able to move between near/far settings) so that I could auto-update the depth of the whole UI to match where the mouse was.

    That in turn would let me use peripheral vision to see my UI elements without having the super annoying doubling that comes with attempting to see something closer to you than where you're focused. (Which is my main complaints with games).
    Posted a reply to your thread over on WoW-I:

    http://www.wowinterface.com/forums/s...191#post281191

    Quote Originally Posted by suicidalkatt
    'Hey Brusalk! Syronius @ Kilrogg in <Modest> here. You can play with frame depth if you'd like. I believe that's the only parameter available in the API to adjust the 3D position. As far as determining the mouse depth, I don't believe that's possible.


    Since all frame objects eventually parent to the main UIParent frame, you can try using the depth parameter on the UIParent frame as follows:


    Code:
    UIParent:SetDepth(value)

    Alternatively you can have a mouse tracking system that will change the depth of the UIParent depending on the position of the mouse (probably the best way to do this).


    Here's a rough untested script:
    Code:
    local f = CreateFrame("Frame",nil,UIParent)
    local scale = UIParent:GetEffectiveScale()
    local centerX = ((GetScreenWidth()*scale)/2)
    local centerY = ((GetScreenHeight()*scale)/2)
    local delayInt = 0.2 -- Delay integer limits update speed
    
    
    f:SetScript("OnUpdate",function(self,elapsed)
        delayInt = delayInt - elapsed
        if delayInt < 0 then -- After delay has completed run code
        
            local x,y = GetCursorPosition()
            local x,y = (x/scale),(y/scale) -- Adjusts for UI Scaling
        
            if (x < (centerX+200) and x > (centerX-200)) and (y < (centerY+200) and y > (centerY-200)) -- Center of the screen
                UIParent:SetDepth(10)
            elseif (x > (centerX+200) or x < (centerX-200)) or (y > (centerY+200) or y < (centerY-200)) then -- Outsides
                UIParent:SetDepth(1)
            end
            
            delayInt = 0.2 -- Reset integer after running code
            
        end
    end)

  5. #5
    Quote Originally Posted by Syronius View Post
    Posted a reply to your thread over on WoW-I:

    http://www.wowinterface.com/forums/s...191#post281191
    Heya.

    Yeah I guess that's probably going to be the best option.


    I tried altering the depth of UIParent and it wasn't actually changing the depth when I would the successively call "GetEffectiveDepth" or even "GetDepth" after setting it, while being in stereoscopic mode.


    I wish 3d was better supported :P

  6. #6
    Quote Originally Posted by Brusalk View Post
    Heya.

    Yeah I guess that's probably going to be the best option.


    I tried altering the depth of UIParent and it wasn't actually changing the depth when I would the successively call "GetEffectiveDepth" or even "GetDepth" after setting it, while being in stereoscopic mode.


    I wish 3d was better supported :P
    Any particular reason you play with 3D enabled?

  7. #7
    Quote Originally Posted by Syronius View Post
    Any particular reason you play with 3D enabled?
    For fun? Why exactly do you think anyone uses 3D monitors, or watches 3D movies or uses he 3D on a 3DS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •