Announcement

Collapse
No announcement yet.

Helping creating an interactive assembling machine

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

    Helping creating an interactive assembling machine

    Greetings,

    First of all, I am sorry if I am in the wrong section of the forum.

    Hello all, could you help me with some examples/insights in how to do a game where you have some mechanical parts on a table and then you need to click it and put in a specific machine to assembly it and make it operational? Maybe, in the end, just an animation of it working.

    It would be something like this: https://www.youtube.com/watch?v=Khvh8vEjm7M But way more simpler, without the VR. I am using the product viewer from unreal studio as my base and trying to understand and modify it now.

    Looking forward for your help.
    Cheers.

    #2
    Any ideas? Where should I post this to get more views?

    Comment


      #3
      Hi FFehn,

      There's a lot going on in your question. Its typically better to ask how to do smaller tasks rather than how to make almost a whole game

      I'll try to help point you in the right direction of some tutorials to get you started though

      Blueprint basics: This should help you get started with blueprints if you haven't done this already. Its a little old but probably helpful: https://www.youtube.com/watch?v=EFXM...n1sWOGfh4C7ewO

      Intractable Objects: You'll need this for the player to interact with the objects. https://www.youtube.com/watch?v=4jZT9ibp_ko

      Widget Components: This will provide the feedback to the player so the know if they've focused on an object. https://www.youtube.com/watch?v=qcRuuKyuE0s

      For the animation part, I'm assuming you'll do that in first person? If so, do you need to have hands and arms? It could simplify things to not and just have the camera and interaction.

      Comment


        #4
        Greetings Arlyn,

        Thank for your patience. I have a basic knowledge of unreal and I am using the product viewer as base for my project. So I have a camera with wasd movement that I implemented and I can interact with my objects by clicking and holding to change its position. I managed to attached two objects using only collision and sockets, is that enough? What I do is begin overlap, check the class of the object and if it is correct, attachtocomponent. Doing this way, I need to create a blueprint for each mesh of the imported inventor object. All of these blueprints are child of a master object that have the collision and a mesh component to make it easier.

        What I need to do now is when it snap to object, I dont want to be possible to move it further with the mouse. I still could not identify the responsible part in the example project code that make the object to move when I click and drag it. Another problem is the location of the snap. I can snap the object in the socket, but If I have like a cylinder in a hole, how can I make that the middle of cylinder snap to the middle of the hole? At the moment, the end of the cylinder is snapping in the middle of the hole. I created a socket in the mesh of the hole to do that. I think its snapping to the end because I am using root component? What should I use to snap in any desired location of the object?

        Another thing, for some reason, if I enable physics in these blueprints, they simple disappear. Maybe they fall down and go through the floor? But the floor is block all dynamics collision...It would be interesting if I could click and drag to move the object, but If I let it go, then it would fall down to the floor.

        Thanks and sorry if it is not understandable. Let me know if you need more details, I will edit if I have further problems.
        Last edited by FFehn32; 04-11-2019, 07:39 AM.

        Comment


          #5
          Hi FFehn,

          No problem we all have to start somewhere!

          Can you post a few screen shots of the object blueprints? That would be helpful context.

          Comment


            #6
            There are almost no code in the object blueprint. Only the snapping during overlap of collision. Almost everything happens in the pawn. At the moment I just need to make the snapping the in middle of the cylinder and maybe make physics working. Everything else is working like object not moving when attached.

            Comment


              #7
              Gotcha, so for the cylinder you'll need to move the origin to the middle of the static mesh (you can do that in a 3D modeling software)

              Right now, your code works by snapping the origin of the static mesh in the Master Object Blueprint to a socket of the "Other Component" in the attach to component node.

              Comment


                #8
                What should I do to make the objects stay on the floor and then when I pick up move to the air and let it go it will fall again? Probably I need to setup the physics, but how can I do that?

                Comment


                  #9
                  That's correct, make sure your the static meshes have collision volumes and are set to block world static and world dynamic. Then try enabling physics again and see what happens. Hopefully that fixes your disappearing problem.
                  Last edited by Arlyn; 04-12-2019, 10:41 AM.

                  Comment


                    #10
                    It looks like its working. But first I need to fix the collision sphere. Why my mesh is not in the middle of the collision? I need to fix the mesh somehow? I didnt move the collision sphere...

                    I need to use blender to recenter all the meshes? Like 90+ meshes...
                    Last edited by FFehn32; 04-12-2019, 06:45 PM.

                    Comment


                      #11
                      You'll need to set up collision on the static meshes themselves, not in the Object BP. You won't need to do it Blender, UE4 can auto-generate collision hulls. I'd be surprised if it isn't set up already. Can you post a screen of the collision settings of one of the static meshes?

                      Comment


                        #12
                        Thank you very much! Thats why the object was going through the floor:

                        By default, there is no collision set on this mesh. Without collision, the player would be able to walk through the mesh and if the mesh simulates physics, the mesh would simply fall through the world as soon as play began. You can test this by placing this mesh into your level before setting up collision and playing.

                        I added the collision on the mesh and now physics is working as intended. However, the origin of the collision in BP to do the overlap all is still in a different origin...

                        Comment


                          #13
                          I think this may help you - try doing what this video did for the static meshes. You'll need to move their pivot points to the center of each mesh. You can also do this in Blender/Maya

                          https://www.youtube.com/watch?v=N1h5mMviSKs

                          Comment


                            #14
                            Thank you, I used blender to move the pivot and everything works better now. That was a lot of work. Anyway, now because I am using physics, my snap is kind of wierd sometimes. I am using attachtocomponent with simulate physics on. Its possible to use gravity without the simulate physics to avoid this bug during snaps?

                            Comment


                              #15
                              You can turn physics on and off during run time. When an object is picked up, try turning off physics and when its let go, turn physics on. Found this example of answer hub... its not exactly what you're trying to do but I think it at least shows you the node you'll need: https://answers.unrealengine.com/que...lueprints.html

                              Comment

                              Working...
                              X