Create a new Structure blueprint in the Structs folder. Call it S_BoneHitboxes and copy the image below.
Next go to the E_HitboxType and add 3 new entry’s Hands , Feet and Other like in the image below.
Next go to the BP_InventoryFunctions and create a new function called Is Player Hitbox? and add a input called bone name and set the variable type to Name and add an output and set it to E_HitboxType.
Next create a new local variable called Bone Hitbox L and set the variable type to S_BoneHitboxes and set it to an array. Next you need to add the bone names and there hitboxes to the array. Copy the image below for the default UE4 skeleton. (Remember if you have a custom character skeleton you will need to add the bone names here and the hitbox that bone should return, you dont need to have all bone names just a word thats in there name for example arm bone name will count for every bone with the word arm in it)
Then in the function make the changes shown in the image below.
Next go to the project settings and then go to the collision tab and click New Trace Channel name it Weapon and set the default response to Block and click Accept.
Next go to the master character and select the hitboxes and like in the image below and delete them.
Then select the capsulecomponent then in the details panel in the collision category set the Weapon trace responses to Ignore.
Next go to the BP_MasterMeleeWeapon and replace the MultiLineTraceForObjects with the node shown in the image below.
Next replace the old hitbox node with the new node one you created like in the image below.
Next go to the BP_MasterRangeWeapon then to the Weapon Trace function then change the Trace Channel on both the LineTraceByChannel nodes like in the images below.
Next in the same function replace the Set Hitbox nodes with the Is Player Hitbox? node like in the images below.
Next go to the Player Inventory Component and make the changes shown below location at the top of the screenshot.
Next go to the BP_MasterGrid then to the Create Selection Grid and select the Add Box Collision node then in the details in the collision category set the Weapon trace to be ignored. Like the image below.
Next go to the BP_DamageZone select the DamageZone component and set the Weapon trace to be ignored in the details panel in the collision category.
Repeat what you did for the damage zone bp to the BP_BlockBuildingZone and the BP_DamageBlockZone and the BP_DrinkZone by selecting there box collision components and setting them to ignore the Weapon trace channel.
Then go to the BuildPreview blueprint then select the Selected Mesh component and in the details in the collision category set the Weapon trace channel to ignore, next select the Safe Overlap Check component and do the same. Then select the Plot Pole Check and do the same again.
Next you need to go to your melee and range weapon holdable blueprints then in the class defaults search for Damage then change the none entry to feet and set the damage value you want for feet for that weapon. Next click the + icon and set the new none entry to Hands and set the damage for that. then click the + again set it to Other and set its damage value then click the + again and readd the none entry and set its damage (Keep in mind that the none damage is the damage done to the Build Part.) below is an example of the new Axe damage.
You need to do this for all your weapon holdables.
NOTE – If you have your own actors that should not block the weapon trace then remember to select the component of the actor and set the Weapon trace channel to ignore in its collision settings.
If you have other characters such as AI you will need to also remove there hitboxes and set there capsule component to ignore the Weapon trace channel.