Announcement

Collapse
No announcement yet.

3D Widget controllable via crosshair?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    3D Widget controllable via crosshair?

    Hey,
    today I toyed around with the 3D widget and the input modes. Would it be possible to add another Input Mode for the crosshair, like I look with the crosshair onto a button, press E / click / etc. and the button fires? That would be very handy!
    Thanks!
    Hobby game developer from Germany Follow me on Twitter!
    Stuff I made:
    Steam Workshop Tutorial/Wiki
    Making a full working translation for your game and change it at runtime

    #2
    Hi iUltimateLP,

    I'm a little confused. Are you talking about having another option on the 3d widget to fire BP events from a umg button while editing/not in Play in Editor?
    Adam Davis | Marketplace Support | Epic Games
    How to report a bug? | Installation & Setup issues? | Answerhub Bug Reports | Twitter

    Comment


      #3
      Originally posted by Adam Davis View Post
      Hi iUltimateLP,

      I'm a little confused. Are you talking about having another option on the 3d widget to fire BP events from a umg button while editing/not in Play in Editor?
      I mean you look with the crosshair at a button inside a 3d widget object and then you click and it interacts with the widget. Its just without the mouse, like you have the cursor attached to the center.
      Hobby game developer from Germany Follow me on Twitter!
      Stuff I made:
      Steam Workshop Tutorial/Wiki
      Making a full working translation for your game and change it at runtime

      Comment


        #4
        Originally posted by iUltimateLP View Post
        I mean you look with the crosshair at a button inside a 3d widget object and then you click and it interacts with the widget. Its just without the mouse, like you have the cursor attached to the center.
        I guess you can do it that way, but it's clear that other ways are necessary.

        So, hello Adam by the way , do you think that what i asked here is doable (currently or later ?)
        If you have a solution let me know

        Comment


          #5
          Hey i got a idea on how you can achive this it may be type of hacky
          In this video https://www.youtube.com/watch?v=dsrZgmv23Yc they show of 3D UMG Widgets.

          The idea is that is you use the same method as they use to enable Game and UI input mode, when player comes close to widget.
          Now the only thing you need to do is set the cursor position to the center of the screen (corsair position) every tick or something, and swap it out for a costume cursor icon, with with Lock Mouse Look to false ofc.

          Of course it may be a simpler method of this but its a idea.
          Last edited by WCode; 01-03-2015, 07:27 AM.

          Comment


            #6
            Unfortunatly, this solution will work for OP but not for me.
            As my game is for VR, there is no screen center. I must really use Raycast or overlap, but i havent seen anything covering this.

            Comment


              #7
              I have no experience with VR so am reching here but.
              You stile have a Camera Component on your pawn/ character.

              Could you not get the pos and loc of the camera component and trace a line the distance you need.
              If it hits the widget then turn on cursor and place it at the trace direction every tick or something and player effectivly moving the cursor by looking.
              May not be prety tough am just throwing ideas around here .

              Comment


                #8
                Originally posted by WCode View Post
                Hey i got a idea on how you can achive this it may be type of hacky
                In this video https://www.youtube.com/watch?v=dsrZgmv23Yc they show of 3D UMG Widgets.

                The idea is that is you use the same method as they use to enable Game and UI input mode, when player comes close to widget.
                Now the only thing you need to do is set the cursor position to the center of the screen (corsair position) every tick or something, and swap it out for a costume cursor icon, with with Lock Mouse Look to false ofc.

                Of course it may be a simpler method of this but its a idea.
                Great idea, unfortunatelly im not that good at this level so could you post a example how to make this in blueprints?
                Hobby game developer from Germany Follow me on Twitter!
                Stuff I made:
                Steam Workshop Tutorial/Wiki
                Making a full working translation for your game and change it at runtime

                Comment


                  #9
                  Yes sure i can give it ago, think its just Get the viewport size Viewport SIze X and Y / 2
                  and set the position of the center with the Set Mouse Position Node on the player controller.

                  I may be of with some naming am at work and i don`t have UE 4 in front of me.
                  WCode

                  Comment


                    #10
                    Originally posted by WCode View Post
                    Yes sure i can give it ago, think its just Get the viewport size Viewport SIze X and Y / 2
                    and set the position of the center with the Set Mouse Position Node on the player controller.

                    I may be of with some naming am at work and i don`t have UE 4 in front of me.
                    WCode
                    There isn't a set Mouse Position node on the player controller...
                    Hobby game developer from Germany Follow me on Twitter!
                    Stuff I made:
                    Steam Workshop Tutorial/Wiki
                    Making a full working translation for your game and change it at runtime

                    Comment


                      #11
                      There most defenetly is (or i have been halusenating lol) drag a link from the Player Controller it should be there.
                      Am off work in 3, 1/2 houers i will get a screenshot up for you then.

                      Comment


                        #12
                        Originally posted by WCode View Post
                        There most defenetly is (or i have been halusenating lol) drag a link from the Player Controller it should be there.
                        Am off work in 3, 1/2 houers i will get a screenshot up for you then.
                        Hmm I'm on 4.6 and I defenetly do not find this But thanks for your screenshot
                        Hobby game developer from Germany Follow me on Twitter!
                        Stuff I made:
                        Steam Workshop Tutorial/Wiki
                        Making a full working translation for your game and change it at runtime

                        Comment


                          #13
                          Here you go mate i was somewhat wrong tough its not under the Player Controller but Widget.
                          But the Get Node is under the player Controller.
                          Click image for larger version

Name:	837d5a80e0ceab9120b925b7f8ce81df.png
Views:	1
Size:	38.2 KB
ID:	1064863
                          Last edited by WCode; 01-05-2015, 11:54 AM.

                          Comment


                            #14
                            Originally posted by WCode View Post
                            Here you go mate i was somewhat wrong tough its not under the Player Controller but Widget.
                            But the Get Node is under the player Controller.
                            And what do you put under the Reply node? Could you post a screenshot of the whole script which would do this like I had in the first post..
                            Hobby game developer from Germany Follow me on Twitter!
                            Stuff I made:
                            Steam Workshop Tutorial/Wiki
                            Making a full working translation for your game and change it at runtime

                            Comment


                              #15
                              Hi Darknoodles,

                              Unfortunately I don't have an answer off the top of my head, I have asked another one of our team who is more familiar with UMG and VR to take a look. I can't promise a response soon as we do prioritize bugs and crashes to general use questions or specific feature inquiries, but once he can get to it he may have an answer to your question.
                              Adam Davis | Marketplace Support | Epic Games
                              How to report a bug? | Installation & Setup issues? | Answerhub Bug Reports | Twitter

                              Comment

                              Working...
                              X