Most of the Pargaon character models also include the sword as a part of the character mesh. I would think that the sword should normally be its own independent mesh that you create an actor for and then attach to the hand via a socket. Then you could check if the sword actor overlaps with any other actors to determine what the player is hitting.
What is a good way to determine what the player hits when the sword is already attached to the character mesh?
asked Dec 26 '18 at 08:57 PM in C++ Programming
As Evigmae suggested, you would attach either box components or capsule components to the character mesh on the sockets where the weapons are. Then you would use On Component Begin Overlap ( If you are doing this in c++ you need to use:
If you need to return specific components you would also use a shape trace (box trace or capsule trace in BP). Additionally, you would need to make an AActor array and include in your code that if the array does not contain the OtherActor, then add the OtherActor to the array and THEN do your effect (like using the ApplyPointDamage function).
answered Dec 27 '18 at 09:10 AM
Nothing is stopping you from attaching a collision volume to the sword socket and use that for hit detection :)
answered Dec 26 '18 at 09:26 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here