Announcement

Collapse
No announcement yet.

(need help) attach mesh to socket?

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

    (need help) attach mesh to socket?

    so I've not a mesh and i'm trying to make it so that i can pick it up using E, but once i enter the pickup zone and press E its not working
    Attached Files

    #2
    Hey Tic-toc,

    I notice that you are setting the attachment to the Get Player Character 0 node and was wondering where the code you posted is placed? The Player character blueprint or level blueprint, etc.

    It all looks fine from a logic standpoint unless I am missing something so I think it might be the character 0 which is referencing the wrong class or something similar. If the code is placed within the character class itself you can reference the mesh directly and see if that solves the issue. The other thing it might be is to just make sure the socket name matches but I am not sure if that would stop it from completely working or not.

    If you are still having issues I have something I made quickly for pickups like this real quick.

    I placed all my code within the pickup actor itself so I don't have to do anything to the default character code. This does mean a little extra work as I need to enable input on the actor when the character is close enough and disable it after.

    Here is how it looks:


    Here is the setup for it:

    This is just the components I used. For the UI I am just using the text renderer and have it rotate to face the player at all times / hide and un hide when needed. Not too fancy but functional.
    Click image for larger version

Name:	PickupAttachment_B.png
Views:	1
Size:	649.7 KB
ID:	1080657

    This is the overview of the actor I created. I'll show it in more detail for each one below.
    Click image for larger version

Name:	PickupAttachment_A.png
Views:	1
Size:	307.0 KB
ID:	1080656

    Here are the each of the pieces to the code in more detail.

    This is our interaction, the Get node which also verifies I think is new for 4.8 otherwise just use the basic verify node for the player. I also have the socket in the skeleton added in as LeftHandSocket.
    Click image for larger version

Name:	PickupAttachment_C.png
Views:	1
Size:	141.8 KB
ID:	1080658

    I activate and deactivate here and show / hide the text
    Click image for larger version

Name:	PickupAttachment_D.png
Views:	1
Size:	203.3 KB
ID:	1080659

    This just rotates to face the player
    Click image for larger version

Name:	PickupAttachment_E.png
Views:	1
Size:	210.5 KB
ID:	1080660

    I didn't get a chance to make him drop it though XD so once its picked up its stuck in his hand! But you get the idea.

    Hope that helps

    Cheers!

    Comment


      #3
      Wow, TYVM this is a entire tutorial in one post. Thank you for making all this on your own time to help, I can't thank you enough.

      Comment


        #4
        Originally posted by GPM View Post
        This is our interaction, the Get node which also verifies I think is new for 4.8 otherwise just use the basic verify node for the player. I also have the socket in the skeleton added in as LeftHandSocket.
        [ATTACH=CONFIG]45223[/ATTACH]
        I'm having trouble getting the get node in UE4(.8) or the Verify node, any help?

        EDIT:
        finely got it, who would have thought you would have to right click a existing get node to convert it to this get node.
        Last edited by Tic-toc26; 06-26-2015, 03:44 PM.

        Comment


          #5
          Now I have another problem how did you get the player on Variables>Components?

          EDIT:
          Found it again...........
          Last edited by Tic-toc26; 06-26-2015, 04:57 PM.

          Comment


            #6
            Glad you figured it out!

            Yep in 4.8 to set the Get node to use verify you just need to right click on it once you add it in and there should be an option to have it become a verify node at the bottom.

            And the Player Variable is just a variable I added in as the default Third Person Character and set it to the player as they hit the Begin overlap / End overlap.

            If anyone is interested I can create a bit more for this and do a real tutorial, include dropping the item as well, etc.

            Let me know! Cheers!

            Comment


              #7
              Originally posted by GPM View Post
              If anyone is interested I can create a bit more for this and do a real tutorial, include dropping the item as well, etc.

              Let me know! Cheers!
              That would help out a lot if you can

              Comment


                #8
                No problem! I'll see if I can to it shortly and post the link here.

                EDIT: Hey all I've been a bit behind but have something brewing - Should have something this weekend! It goes into a bit more detail on how I like to setup my interactions and such which might help with other things as well as the pickup and dropping parts.
                Last edited by GPM; 07-17-2015, 09:29 PM. Reason: Update on progress

                Comment


                  #9
                  Tutorial still in the works!

                  Hey all I am a bit behind with the tutorial as its getting a bit bigger than initially planned but it'll be up there soon.

                  For now I figured I'd show off the overview video for it and add the tutorial here once it is done.

                  Comment


                    #10
                    man, this is uber cool, i would like to see this tut!

                    Comment


                      #11
                      Hey all I got a chance to create the tutorial. It ended up being much longer than I wanted and I cover quite a bit, not only the attachment and dropping but an entire basic interaction system!

                      http://gregmladucky.com/blog/?p=590#more-590

                      I haven't had a chance to really read over it yet and wanted to get it out asap! If there are issues or if I missed anything let me know!

                      Cheers!

                      Comment

                      Working...
                      X