Announcement

Collapse
No announcement yet.

Attach two blueprint objects

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

    Attach two blueprint objects

    Hello.

    Im trying to do realistic door in VR, without animation. I have working door and handles in two different blueprints and now I'm trying to attach them together so when I press the handle, only then to open the door. I uploaded 4 pictures to show you where I am right now, but I don't know what should I do to continue, to make one blueprint for the two meshes or to attach them somehow ? I tried to push the door with the handle collision but its not working very well.. Any suggestions?

    #2
    There are 2 "AttachToComponent" that you could use.
    Or put a scene component in the DoorBP where you want the handle to be.
    And when the door rotates, use a custom event that is called inside the handleBP and get the scenecomponents worldLoc &Rot and set it to the doorhandle using a timerByEvent so it updates smoothly

    But attachToComponent would be easier

    Comment


      #3
      The problem is that handle has a constraint to not being able to move at X, Y or Z, only to rotate around X axis. In blueprint options I need to choose what I want to do with the object - to move it or to rotate it, but not both at the same time.. maybe I need to make changes in blueprint.. I think that this cannot be done with AttachToComponent, but I will try with scene component.

      Comment


        #4
        Hello again, I'm still struggling with the same problem, but this time I wanna cast from one blueprint to another one variable, which contains information from GetWorldRotation and set it to another variable from the second blueprint, is there any way that will help me to do it properly ? I cant attach the door handle with the door, because both of them are interactive blueprints..


        Another problem is that I want to rotate the second blue print not around his axis but to use axis of scene component from first blueprint.. is that possible ?
        Attached Files
        Last edited by MOSErkan; 08-28-2018, 06:42 AM.

        Comment


          #5
          I think it would, I have something similar working on my project.
          I have a DoorBP and a SwitchBP
          In the doorBP i have a sceneComponent (not root) that i called switchPosition.
          On eventBeginPlay I set the switchBP to the doorBP(switchPosition)(setWorldLoc&Rot)
          When the door opens i have a timeline, and the "update" output from the timeline, I am firing a custom event in switchBP to setWorldLocation while getting the vector through the custom event.
          There probably might be a easier way to do it, but that is what I did, and it works.

          Comment


            #6
            I believe the best way to handle this would be to make the whole object a skeletal mesh with bone for root / hinge /and door handle.
            then you could clamp the bone rotations in the physics asset.
            Last edited by AlphaWolF; 08-30-2018, 06:38 PM. Reason: spelling
            https://www.artstation.com/alphawolf
            https://www.deviantart.com/alphawolf-uk/gallery
            https://www.youtube.com/user/AlphaWoIFuk/videos

            Comment

            Working...
            X