Announcement

Collapse
No announcement yet.

Pick up Procedural Chopped mesh

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

    Pick up Procedural Chopped mesh

    Hi All !

    So I'm trying to create some wood logs that can be picked up and chopped with an axe.

    The axe is ok, the choppable wood log is working, but when I try to add a pick up event to the log it doesn't work, it just can't be grabbed, and when I try to drag the BP in the world it just goes to 0,0,0 and can't be moved rotated even in the editor....

    Blueprints attached.

    Help would be greatly appreciated !


    #2
    Hi,

    1) set Procedural Mesh to overlap all collision types
    2) start in Simulation Mode with collision view enabled and check if it has a correct collision shape.
    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
      Yup collision, are fine, when I try to grab it, I have the animation and vibration starting as if I can, but it's not moving. I can still cut it with my Axe, but no possibility to grab it to move it around. (even before it's been cut)

      Comment


        #4
        Ok then. Do you have any warnings after playing? Make sure procedural mesh compnent is movable and it isn't detached from the actor's components hierarchy.
        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
          No error or warnings as far as I can see... I tried to modify the event graph by adding the procedural mesh to set simulate pyshics OFF and ON on pickup and drop but didn't change anything.
          The procedural mesh gets the mobility from the static mesh I think, and this one is set to movable.
          I basically copied the BP from the blue cube in the demo VR map, and then added the choppable functionnality on it.

          Comment


            #6
            It wouldn't work if physics simulation for the Procedural Mesh was enabled at some moment before Pickup.

            Physics simulation when it's enabled detaches primitive component (in this case - Procedural Mesh) from a parent. It means Procedural Mesh isn't attached to RootComponent when you attach RootComponent to player's hand. In the Event Pickup add AttachToComponent(Procedural Mesh to GetRootComponent) before AttachToComponent(GetRootComponent to Parent_parameter).
            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
              Ok I think I get what you mean, but can't seem to manage to get it done lol.
              I've tried the BP update below.
              And I copied the resulting errors :

              Code:
              Blueprint Runtime Error: Accessed None trying to read property CallFunc_K2_GetRootComponent_ReturnValue from function: 'ReleaseActor' from node: Branch in graph: ReleaseActor in object: BP_MotionController with description: Accessed None trying to read property CallFunc_K2_GetRootComponent_ReturnValue
              Blueprint Runtime Error: Accessed None trying to read property LogMesh from function: 'ExecuteUbergraph_BP_Log' from node: Set Simulate Physics in graph: EventGraph in object: BP_Log with description: Accessed None trying to read property LogMesh
              Blueprint Runtime Error: Accessed None trying to read property CallFunc_K2_GetRootComponent_ReturnValue from function: 'ExecuteUbergraph_BP_Log' from node: AttachToComponent in graph: EventGraph in object: BP_Log with description: Accessed None trying to read property CallFunc_K2_GetRootComponent_ReturnValue

              Comment


                #8
                LogMesh (Static Mesh) is a root component
                ProceduralMesh is as child component.

                LogMesh was destroyed in the constructor.

                In the events graph you're trying to access LogMesh (which was destroyed) and root component (i.e. LogMesh).

                Simple solution: remove all references to LogMesh. ANd you don't need additional AttachToCOmponent node call here:


                But I'd recommend to create another blueprint which has ProceduralMesh component as a root and LogMesh as static mesh component attached to the ProceduralMesh (not vice versa). In this setup you use unimportant child component to initialize ProcedralMesh in constructor and don't need it later.
                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
                  Gotcha ! Thanks, that solved the pickup issue. Now, I can't drop :P Do I need to change something for the target of DetachFromActor ?

                  Sorry about all that, I'm fairly new to BP, I followed the tutorial from https://www.youtube.com/watch?v=RWIQVTB6km0&t=2507s, but it doesn't show how to create procedural mesh that can be picked up.

                  Edit : Putting the procedural mesh as a root and logmesh as static mesh solved that issue.

                  So now, if I want to be able to grab the piece of mesh that was slice, is there an easy way to do that ?

                  Thanks again for your help !

                  Edit 2 : nevermind I figured a way to rotate the sliced mesh, so all good
                  Last edited by Sedoriku; 02-05-2018, 10:01 PM.

                  Comment


                    #10
                    Hi
                    Just wondering if your VR mesh slicing is as buggy as mine. do you get nice clean single cuts or does it bug out, and do multiple cuts and cut in the wrong direction .
                    like mine does . I would like to solve this if I can

                    https://youtu.be/srgvX7-2OkE
                    https://www.artstation.com/alphawolf
                    https://www.deviantart.com/alphawolf-uk/gallery
                    https://www.youtube.com/user/AlphaWoIFuk/videos

                    Comment


                      #11
                      Do you also have a solution for pick up the small pieces from the main procedural mesh?
                      For example when you slice the wood log than you have tow pieces of wood and pick up the two wood pieces.
                      I tried to pick up the second piece (Out Other Half Proc Mesh) but it was not possible.
                      The strange thing was when I tried to pick up the second piece then always the "parent" piece was taken.

                      Comment


                        #12
                        Originally posted by cyclingpanda View Post
                        Do you also have a solution for pick up the small pieces from the main procedural mesh?
                        For example when you slice the wood log than you have tow pieces of wood and pick up the two wood pieces.
                        I tried to pick up the second piece (Out Other Half Proc Mesh) but it was not possible.
                        The strange thing was when I tried to pick up the second piece then always the "parent" piece was taken.
                        Did you ever find a solution to this? The other half always gets parented to the root, can't figure out how to make it into it's own actor... if that's even possible :/

                        Edit: Figured out a way, instead of trying to pick up actors just changed it to picking up components.
                        Last edited by Kijaii; 10-10-2018, 12:46 PM.

                        Comment

                        Working...
                        X