Announcement

Collapse
No announcement yet.

PainCausingVolume deals no damage to APawn based Actor

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

    PainCausingVolume deals no damage to APawn based Actor

    Good day,
    PainCausingVolume deals damage to ACharacter based Actor, but not APawn based one.
    I cannot figure out why exactly. There is nothing different in the ACharacter class code in terms of taking damage, but somehow they behave differently.

    Any ideas?

    Thanks,
    K


    #2
    Nothing should be stopping it. Have you traced in to APawn::TakeDamage() and seen where it's failing? Also check to make sure bCanBeDamaged is true and make sure you're calling it on the server. Other than that it shouldn't matter (fwiw: bCanBeDamaged is set to true in the constructor but check to make sure you didn't inadvertently turn it off).
    Joseph Wilcox
    [Technical Director] WisEngineering
    https://www.wisengineering.com
    https://www.digitalleprechaun.com

    Comment


      #3
      Two classes are completely default, no modification is done. Just two BP inherited one from APawn and the other one from ACharacter. UE 4.23

      Thanks, I will investigate TakeDamage();

      Comment


        #4
        ACharacter includes a capsule component which overlaps with the PainCausingVolume. APawn includes no overlappable components unless you add them.

        Comment


          #5
          Ok, It makes sense. But I will need to register new capsule component to receive "damage" I think.

          Thanks!

          Comment


            #6
            Ok, adding Capsule component partially solved it: Now I have an initial overlap "damage", that happens one time upon overlap with the PainCausingVolume. But trying to investigate further, as there is no damage every second happening for the Pawn setup. I think it might be the settings of the Capsule component, trying to figure out what settings exactly.

            Comment


              #7
              The way it's currently set up in code, it looks like if your actor does not have a movement component, it would only take into consideration the volume of the root component.

              Comment


                #8
                No, no movement component. But it started to apply damage on initial intersection only after I've added a capsule component. But this is interesting. I wasn't looking in the movement component as I thought its not related, but I will look into it in the evening. Thanks

                Comment


                  #9
                  You dont have to have a movement component, but if you dont then the root component of your actor has to be overlappable.

                  Comment


                    #10
                    Ok, so I have fixed it! Problem was that my root component is Sphere component, and it was overlapping another physics body in my setup. "Should Update Physics Volume" checkbox set to true solved my problem.

                    Comment

                    Working...
                    X