Announcement

Collapse
No announcement yet.

Collision does not work with Actors that are attached to other Actor

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

    Collision does not work with Actors that are attached to other Actor

    I'm using UE 4.7.6. I encounter a problem with simple collision. The steps that I did are as follow:

    1. I create an Actor blueprint (let's say Actor1).
    2. I add a Scene Component inside Actor1.
    3. I create another Actor blueprint (let's say Actor2).
    4. I add a Static Mesh Component inside Actor2.
    5. I enable the BlockAll collision preset on Actor2.
    6. On the level editor, I created 2 instance of Actor2 (let's say Dummy1 and Dummy2).
    7. Then I create a new PlayerController blueprint.
    8. Inside that PlayerController blueprint, I created a keyboard event listener. For example, I would do something if I press K key.
    9. From that node, I created another node called Add World Offset so I can change the location of Dummy1 to get closer to Dummy2.
    10. The collision works perfectly. Dummy1 will never get pass Dummy2.
    11. Now, I attach a dynamically spawned instance of Actor2 to a dynamically spawned instance of Actor1 (Actor1 become parent of Actor2), by using Attach Actor to Actor node. I repeat this step twice to get 2 instances of Actor1 (Dummy3 and Dummy4).
    12. I revise my PlayerController blueprint to alter the location of Dummy3 to get closer to Dummy4 by using Add World Offset node.
    13. The collision FAIL. Dummy3 can go through Dummy4 as if they never collided.


    Is this an expected behavior?
    If it's a bug, is there a workaround for it?

    #2
    If I understand your situation correctly, you want an attached actor (a child of some other parent actor) to generate collisions? This is not supported by the engine, as far as I know. The child actors do not perform a "sweep" when moving, so they do not detect collisions.

    I have a very basic fix for this in C++, here:
    https://answers.unrealengine.com/que...ed-actors.html

    Sorry that doesn't help much if you're working with blueprints. Epic is aware of the issue and has said in a few posts on the AnswerHub that they are "considering" a fix.
    Level 17 The Ladon Device

    Comment


      #3
      I've run into this problem as well. I'm using child attachments for a vehicle and the attached parts do not react to collisions. If child actors do not work for this can someone recommend an alternative method?

      Comment


        #4
        same problem, seems to be a thing still after so many years.

        Comment


          #5
          Yep, dealing with the same thing now too. I understand why it is this way but still.......

          Comment


            #6
            Did Anyone found some workaround for this problem ?

            Comment


              #7
              Child actor collisions work just fine.
              the issue is how you set them up and IF you do the spawning via blueprint.
              When you do it via code/BP, you also have to enable the correct collision via blueprint.

              Comment


                #8
                And if u are already there MostHost LA. What is the correct way to set it up and what collision we do need to enable ?

                Comment


                  #9
                  Usually, you create a custom channel within the settings, test it on manually placed objects so you are sure it works.
                  And you just apply the channel/turn on simulate physics or whatever else you need to do via BP.

                  Basically if you spawn something in BP the default setting for collision is not set. You need to tell it what it is.

                  Comment


                    #10
                    I want to Attach a already in Editor spawned (Blueprint) Box to the Player Character so the Player can move the Box around.
                    Attaching, Moving etc works already. i also can jump on the box etc, but as soon i Attach the Box and move it to a wall it gets in wall
                    and the pawn Cabsule Collision is the thing where Collision is, Box seems not to colide. U know how i can set it up to Colide with my walls ?
                    Should be World Static, i already set this to the Mesh but it has no collision after Attaching Box Actor to my Character Actor.

                    Thx for ur answer

                    Comment


                      #11
                      This problem is also because we have no character pulling a cart? Because the moment you enable physics everything flies around. For attached meshes I usually keep them on NoCollision.
                      Originally posted by DarkSoe View Post
                      U know how i can set it up to Colide with my walls ?
                      You can use the Set Collision profile Name node, or Set Collision Response to All Channels node, or Set Collision Response to Channel nodes to set collisions. So perhaps create a new Collision channel, set it after attaching, and have it only block StaticMesh?
                      [LEGENDS of EPICATwitter Discord]

                      Comment


                        #12
                        I already tryed to set enable collision and set Channels to Block World Static and World Dynamic but nothing. it still gets trouth walls like a ghost.
                        But yeah. i dont want to enable Simulate Physics, then it flyes around like ****, thats why i want to attach id to a Character.

                        Click image for larger version  Name:	Unbenannt.png Views:	0 Size:	62.2 KB ID:	1823263
                        Last edited by DarkSoe; 10-18-2020, 06:22 AM.

                        Comment


                          #13
                          Well. doing it woth a BoxTrace that is 5 units smaller as the box and tracing 5 units in direction the Character wants to move. it the Trace not Hits the Character can move. This is working for now.

                          Comment


                            #14
                            You may want to try physical animation if you want to react to the environment with an item attached to a socket.

                            Theoretically attaching an item to a socket doesn't change the collision it was given.

                            I'd ave to run some tests to give you a solution, but physical animation is likely the best way to go about it anyway.

                            make sure the capsule component also collides with the box, and that the box is outside of the capsule component when you attach.

                            Comment


                              #15
                              Best example everybody should know, what i want to achieve is some thing simmilar to this. Works now with the Box Trace perfectly fine.

                              Click image for larger version

Name:	162663-lara-croft-tomb-raider-legend-windows-screenshot-in-spite.jpg
Views:	75
Size:	164.0 KB
ID:	1823548

                              Comment

                              Working...
                              X