So does OnTriggerEnter for a melee fighting system sounds like a good idea? Basically I put the trigger on the swords/shields. So far I can’t say it’s been working magnificently, I have some bugs but question is if as a base it’s a good framework for a medieval melee fighting system. Uploaded a gif showing what I did so far.
No from my experience it is totally wrong. With fast weapons/fps you will have tunneling without OnTriggerEnter registering.
I’m myself creating melee fight in my game, right now I’m experimenting with ray casts and it is still far from acceptable.
Thanks for the “tunneling” term, I was not aware it can happen. I suppose that if I keep the motions slow it should be ok then.
You might try, but this is kind of a lottery.
I’m afraid so far it didn’t turn out too well, triggers don’t seem to like speed. Here’s my result after rehashing the scripts/animations
Does anyone wanna chime in with another idea?
I was cheering for you but I was expecting it to happen.
Unfortunately physics kind of sucks in what it is supposed to do.
So I think you will have to try the raycasts after all.
Chose points along the edge of your sword - density depends on the smallest objects you will be hitting, and do raycasts from previous positions to current positions.
Thanks for the advice but I’m worn down by all the work it requires. Not worth it. I’m trying to do something more creative (=easier) with the fighting system at the moment so I’ve abandoned the live-action style.
How would go about doing this ? Do you have some kind of a sample of this approach ?
You can search for “Mordhau” medieval multiplayer game development blog i think they are explaining it there.