Announcement

Collapse
No announcement yet.

'Third Person Character' Does not inherit from 'Primitive Component' warning

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

    'Third Person Character' Does not inherit from 'Primitive Component' warning

    Hi need help figuring this out. I am just trying to trigger an overlap event on an item so the name appears but I am getting this warning and when I overlap my item I don't see any text. ThanksClick image for larger version

Name:	uuBqXZi.png
Views:	1
Size:	390.4 KB
ID:	1204051

    #2
    "ThirdPersonCharacter" is an "AActor".
    "OverlappedComponent" is a "UPrimitiveComponent".

    You are trying to cast the "UPrimitiveComponent" to the ThirdPersonCharacter, but it's not inheriting from it.
    That means the "UPrimitiveComponent" is not a parent of it and the casting will fail always.
    You simply can't cast a Parent to a Child that is 100% not a Child of it.

    Also this is only a warning. It's not actually an error. It gives you a small hint that the logic you setup makes no sense.

    If you don't understand these words, please make sure to inform yourself about "Inheritance" in Object Orientated Programming Languages.

    To fix your problem, connect the "OtherActor" to the Cast node, instead of the "OverlappedComponent".
    Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

    My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
    (Including 100+ Pages Multiplayer Network Compendium to get you started.)

    Comment


      #3
      Thanks for you help!

      Comment


        #4
        Thanks mate! This helped my problem aswell

        Comment

        Working...
        X