Announcement

Collapse
No announcement yet.

Object Parenting: How and what?

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

    Object Parenting: How and what?

    So yes. I've been playing around with things, and I noticed something.

    A few things say that it adds force/motion/position "relative to the parent". However, when actually using those, it seems like it uses the global scene / the level as a parent (and that's despite the object printing another object as it's parent when converting object to string and printing string).

    So my question is, how exactly does UE4 sees object parent relationships in a blueprint, and how can I make use of them?

    #2
    Any answers?

    Comment


      #3
      What kinds of objects are you talking about?
      Blueprint Actors are typically parented to the scene, but could be parented to other Actors with the right attachment.
      Blueprint Actor Components are typically parented to the actor they attach to, BUT certain properties that talk about the "actor" (not the "component") will be in the actor's parent space, which will typically be relative to scene.

      So, if you have more specific examples, you could get better answers: "I create an instance of class A, and add it to the world by doing B, and then I look at the property named C, and it seems to be in scene space"

      Comment


        #4
        I create an instance of Class A (which is a pawn actor I have created). I add it to the world with an event in the Player Controller (which is spawned by the level), which runs a CreateActor then a Possess on the pawn. Then I look at the property "parent" of a COMPONENT of the blueprint and it returns None. I look at property "Relative Position" of that component and it returns the world position of that component. No other actors are involved - my issue is purely with component parenting.

        Comment


          #5
          Then I look at the property "parent" of a COMPONENT of the blueprint and it returns None
          In which function do you do that?
          If the component hasn't run full initialization yet, it won't yet have a parent.

          Comment


            #6
            I run it in the EventGraph of the actor in question, via a keybinding at the moment. And so if by the time I run this it has not fully initialized, there is something strange.

            Comment


              #7
              Any answers?

              Comment


                #8
                So I'm just going to assume that object parenting within a blueprint isn't a thing.

                Comment

                Working...
                X