For several months I’ve been trying to create a way to take out enemies by jumping on them, a la Super Mario, but to no avail. My first attempt at this was to attach a collision box to the underside of my character’s model that would handle all of the collision events with the enemy. Unfortunately though, it turned out that the events of the collision box would frequently be unable to respond fast enough to prevent the character’s capsule component from contacting the enemy, resulting in the player occasionally taking damage from jumping on the enemy.
So my second idea was to instead scrap the collision box in favor of Line Tracing based on this tutorial Link] I found on YouTube.
The idea would be that when the line trace detects contact between the player and enemy, the damage collision from the enemy would be disabled as long the player is making contact with the enemy. When the player isn’t in contact with the enemy then the enemy’s damage collision would then be restored.
It all sounds simple enough on paper, but in practice I have no experience at all with Line Tracing & the tutorial I linked above is far too simplistic to help me out. I’ve tried looking for other tutorials covering Line Tracing but none of the ones I’ve looked at so far seem to carry the info I need to set up the interaction between the player and the enemy.
I also tried asking for help on UE4 AnswerHub but my question disappeared after I edited it after a almost two month long period of getting no responses, with my question still missing several days later.
EDIT: Nevermind about this part, my question finally appeared.
So can anyone help me out here? I just don’t know what to do, I don’t know how to set up a line trace to work in the manner that I want it to or where to look for such information. As a result, I’m completely in over my head with this matter and in a desperate need of help, so please help in any that you can.