Hi I am trying to apply damage to a VRPawn for steamVR but I’m not having much luck.
This is the health and damage I have set up in the VRPawn. I checked it with a keypress to apply damage and it did work but when I use the event any damage It’s not working well.
This is set up in my AI when I use the get player pawn it seems to cause damage as soon as its spawned into the world. It doesn’t matter if it is overlapping the pawn or not. When I take it out no damage is caused to the pawn…
I’m wondering is that because the event any damage doesn’t know how to apply the damage to the pawn because it doesn’t know what to overlap? Is that how event any damage works? That it has to overlap a 1st or 3rd person mesh in the viewport because the VRPawn doesn’t have a character mesh.
Two things I can think of. Either the collision like you said because VRPawn doesn’t have a mesh. Fix this by adding a capsule collision. Make sure your overlaps are actually firing by firing a print screen when you want your event to trigger.
Once you confirm that you are correctly overlapping and it’s triggering, if you’re still not taking damage, the reason might be because you must drag off your Get Player Pawn and do Cast To VRPawn, then do apply damage. Not 100% on that one, it’s probably the collision thing.
I’ve created the capsule collision but how do I tell the game that when event any damage occurs I want it to occur because the AI box collision overlaps the capsule collision or does that happen automatically when I put in a capsule collision in which case that didn’t work.