Announcement

Collapse
No announcement yet.

How to position Picked up items & Weapons in VR Hands correctly?.

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

    How to position Picked up items & Weapons in VR Hands correctly?.

    recently got my hands on Oculus Touch & I Already figured out how to pick up custom items I created by using the VR motion controller Template, And using the blue cube blueprints as the core for them.
    Only issue is they are picked up in the Orientation I grab them.
    But I would like picked up items to automatically just fit in to the correct position in hand when held, Like robo recall manages to do with guns and Broken limbs.
    Is it just a case of the Traditional method of snapping items to a custom weapon bone on each hand or is there something more to this?
    I cant seem to find much covering this
    Last edited by AlphaWolF; 08-24-2017, 07:44 AM.
    https://www.artstation.com/alphawolf
    https://www.deviantart.com/alphawolf-uk/gallery
    https://www.youtube.com/user/AlphaWoIFuk/videos

    #2

    Hi. In my version of PickUp Interface I have a function GetTransformRelativeToHand(EControllerHand Hand). Every pickable object returns a desired offset to hand which can be used in PickUp event: AttachToComponent (Moiton Controller Component), then SetRelativeLocationAndRotation(DesiredRelativeLocation, DesiredRelativeRotation).



    It's C++, but it's quite simple.
     
    Spoiler


    And an example of how it works:
    Stand-alone mocap app for Vive Trackers: vrmocapstudio.com
    Marketplace: Vive Mocap Kit / Fingers Solver / VR IK Body Solver / Subtitles to LipSync / Dialogue System with Character Animation
    And random stuff at Youtube

    Comment


      #3
      thanks YuriNK Thats some really nice work and exactly what I want .
      Im not a coder, like to do everything in Blueprints , but I will give this a try if there are no Blueprint solutions or may even try to pull it off with a snap to solution.
      or continue to look in the Robo recall modkit blueprints
      https://www.artstation.com/alphawolf
      https://www.deviantart.com/alphawolf-uk/gallery
      https://www.youtube.com/user/AlphaWoIFuk/videos

      Comment


        #4
        You can do the same things in blueprints. Just add this function to your PickUp interface and override it with custom relative transform in all actor blueprint implementing this interafce.
        Stand-alone mocap app for Vive Trackers: vrmocapstudio.com
        Marketplace: Vive Mocap Kit / Fingers Solver / VR IK Body Solver / Subtitles to LipSync / Dialogue System with Character Animation
        And random stuff at Youtube

        Comment


          #5
          Hey YuriNK, thanx for the script. At the and of the video you are touching (with pointing hand animation) physically to 3dwidget (probable in actor) menu panel, how did you do that man it`s great, i dont wanna use widgetinteraction because when i say show debug, debug shapes showing up with extra black duplicates and also when i`m using MotionController (R) Trigger for Press/Release Pointer key losting other grab/grip ability ! If you can give some idea it would be awesome, thank you for your time..

          Comment


            #6
            Originally posted by syhdesign View Post
            Hey YuriNK, thanx for the script. At the and of the video you are touching (with pointing hand animation) physically to 3dwidget (probable in actor) menu panel, how did you do that man it`s great, i dont wanna use widgetinteraction because when i say show debug, debug shapes showing up with extra black duplicates and also when i`m using MotionController (R) Trigger for Press/Release Pointer key losting other grab/grip ability ! If you can give some idea it would be awesome, thank you for your time..
            It's not a Widget Component, it's a custom menu actor with static mesh, because I want cool noise effect and bloom. But you can do the same with Widget Component and Widget Interaction Component. Just turn off debug draws in Interaction component settings and use small distance to plane instead of trigger press to send left mouse button event.

            Click image for larger version

Name:	01.jpg
Views:	558
Size:	99.7 KB
ID:	1345321
            Stand-alone mocap app for Vive Trackers: vrmocapstudio.com
            Marketplace: Vive Mocap Kit / Fingers Solver / VR IK Body Solver / Subtitles to LipSync / Dialogue System with Character Animation
            And random stuff at Youtube

            Comment


              #7
              Originally posted by YuriNK View Post

              It's not a Widget Component, it's a custom menu actor with static mesh, because I want cool noise effect and bloom. But you can do the same with Widget Component and Widget Interaction Component. Just turn off debug draws in Interaction component settings and use small distance to plane instead of trigger press to send left mouse button event.

              Click image for larger version  Name:	01.jpg Views:	1 Size:	99.7 KB ID:	1345321
              Hey YuriNK i made exactly what you sad, i added index finger collider inside the hand mesh (inside the BP_Motion_Controller), (im not using widgetinteraction component anymore-i dont understand what you mean here:'use small distance to plane') only i cant connect widget to GetWorldTransform as a variable! Do i need to create some functions inside the button widget or what ? Thank you..
              Last edited by syhdesign; 08-29-2017, 09:25 AM.

              Comment


                #8
                Hwew you need to get a plane of widget in world space, so make sure you're connecting to GetWorldTransform node a reference to widget component, not widget object inside of this component.
                By 'use small distance to plane' I mean that if you want to use touch event instead of trigger press, you can detect touching by measuring distance from index finger to display. If the distance is small (for examlpe, < 0.5), you can send LMB event to widget.
                Stand-alone mocap app for Vive Trackers: vrmocapstudio.com
                Marketplace: Vive Mocap Kit / Fingers Solver / VR IK Body Solver / Subtitles to LipSync / Dialogue System with Character Animation
                And random stuff at Youtube

                Comment


                  #9
                  Hey @YuriNK
                  Here the details: https://forums.unrealengine.com/deve...ion-tablet-pad
                  Sorry for disturbing this topic..

                  Comment

                  Working...
                  X