Announcement

Collapse
No announcement yet.

Child component moved away

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

    Child component moved away

    Hi!
    I watched "Blueprint QuickShot - 6 - making Procedural Content" and created the same ManyBoxes blueprint. Then I decided to give some physics to boxes and created a blueprint called PhysicsBox, that contains a static mesh component with enabled gravity. In ManyBoxes, I changed Add StaticMeshComponent to Add Child Blueprint, and set PhysicsBox in its parameters. But when I tried to simulate this, all boxes moved to the other point, but the root component of ManyBoxes didn't moved. But if to use just PhysicsBox, then it works perfectly.
    Start: Click image for larger version

Name:	Start.PNG
Views:	1
Size:	368.8 KB
ID:	1137788
    Simulate: Click image for larger version

Name:	Simulate.PNG
Views:	1
Size:	417.4 KB
ID:	1137789
    ManyBoxes: Click image for larger version

Name:	ManyBoxes.PNG
Views:	1
Size:	119.4 KB
ID:	1137790

    I spend several hours trying to understand the problem, but I didn't found it... Can somebody help?

    With best regards,
    UCoder123.

    P. S. If needed, I can send this assets via E-Mail - I can't attach *.uasset files to thread...
    P. S. 2 Does the EULA allows me to send them via E-Mail?

    #2
    not entirely sure why you would use contruction script for a procedurally generated content as a child component.
    as ManyBoxes's transform would decide where they are even after they are spawned.(as you see it's floating, and maybe do some crazy things.)

    Maybe I misunderstand your intention, but try to use SpawnActor node, instead of a addChildActorComponent.
    Unreal Engine 4 Game Framework diagram for relation of all major base object types
    Unreal Engine 4 Input Event diagram, scroll down to section Input Processing Procedural
    Resident Evil Classic Camera
    RPCs official document, Must Read
    Everything you should know about replication

    Comment


      #3
      The root component is not moving because it is separate from the child actors you have created, and you are likely moving the child actors in runtime and not the root component. There simply isn't anything moving the root. It's the separate child actors that are simulating the physics. The root would need to be simulating physics as well and be tangible for the root to move.
      DO contact me with questions about Blueprint or other Unreal features! I don't bite! Or charge money! Just press that blue Skype button and fire away.

      Project Culverin - Open Ended First Person Shooter

      Comment


        #4
        I will specify my question.
        When I set the ManyBoxes blueprint on the scene, all the child bluperint components has some coordinates. But when I press simulate button, all the boxes are moving to the other points, but there is nothing, that moves it. I checked it by migrating ManyBoxes.uasset and PhysicsBox.uasset in the other project, where the problem still was...

        Summarizing the results: my problem is that all the child bluperints are moving somewhere without any reason.

        Comment


          #5
          Made a *.gif file that illustrates the problem - even if I will say the number of boxes to 1 - they always move away...
          Click image for larger version

Name:	Gif1.gif
Views:	1
Size:	709.5 KB
ID:	1053962
          Attached Files
          Last edited by UCoder123; 08-26-2014, 08:08 AM.

          Comment


            #6
            Originally posted by UCoder123 View Post
            I will specify my question.
            When I set the ManyBoxes blueprint on the scene, all the child bluperint components has some coordinates. But when I press simulate button, all the boxes are moving to the other points, but there is nothing, that moves it. I checked it by migrating ManyBoxes.uasset and PhysicsBox.uasset in the other project, where the problem still was...

            Summarizing the results: my problem is that all the child bluperints are moving somewhere without any reason.
            Try ticking the "manual attachement" box. It could be a double transform issue. Also, I noticed you are plugging that unit vector directly into transform - is that intentional?
            DO contact me with questions about Blueprint or other Unreal features! I don't bite! Or charge money! Just press that blue Skype button and fire away.

            Project Culverin - Open Ended First Person Shooter

            Comment


              #7
              No... That didn't worked...
              Can I send to you this blueprints by E-Mail?

              Comment


                #8
                I found the problem!
                I tried to use wall sconce instead of PhysicsBox, and everything worked perfectly.
                I checked the differences: PhysicsBox had only 1 component - static mesh, and wall sconce had 2 components (actually there is also a point light, but it doesn't matter) - scene component and static mesh component.

                WallSconce: Click image for larger version

Name:	Right.PNG
Views:	1
Size:	10.9 KB
ID:	1053994

                PhysicsBox: Click image for larger version

Name:	Wrong.PNG
Views:	1
Size:	10.2 KB
ID:	1053995

                When I added scene component to my PhysicsBox, the problem was solved.
                Thanks to everyone for your help!

                P. S. Why the scene component was so important?
                Last edited by UCoder123; 08-27-2014, 04:08 AM.

                Comment


                  #9
                  probably a bug, maybe you can send this to answerhub's bug section.

                  the box itself should already have a transformation component(from actor class), and scene component itself is just transformation(like an offset).
                  Unreal Engine 4 Game Framework diagram for relation of all major base object types
                  Unreal Engine 4 Input Event diagram, scroll down to section Input Processing Procedural
                  Resident Evil Classic Camera
                  RPCs official document, Must Read
                  Everything you should know about replication

                  Comment


                    #10
                    Hey Guys, thanks for letting us know about this. I tested it out and could reproduce it. I spoke with our developers and there are a few fixes for ChildActors coming. I entered a report for this issue specifically, but there is a good chance that it is already being worked on. I will let you know if anything develops. I am testing a potential fix right now.
                    Twitch /unrealalexander| Twitter @UnrealAlexander
                    How to report a bug? | Installation & Setup issues?
                    Call me to a thread by posting this: [MENTION]Alexander Paschall[/MENTION]

                    Comment

                    Working...
                    X