Enemy Only Takes Damage From The Feet/Below (Prefab Position Issue?)

Edit: Fixed

Hey, I have just finished creating the bow and arrow system, however my arrows aren’t dealing damage whenever I hit the enemy radius, it only deals damage if the arrow hits the very bottom of the feet or the goes just under the radius.

(Been messing around for a while now trying to figure it out, this is the latest theory >.<)
My theory is that the prefab positioning is messing it up, but I have no idea how to change it. It was a paid asset and whenever I drag the asset into the scene, it’s very large and the animation/image is a lot higher than the transform location.
6521025--735771--upload_2020-11-13_17-11-12.png
As you can see in the image, the AI Pathing line starts from below the enemy (supposed to do that instead of center?), and there’s a blue circle far below the enemy (Center of the animation/image?)

Your image isnt very clear to me, I dont see the arrow at all. Anyways, it sounds like the collider is lower than the sprite location (like you are thinking). To test it out without messing up your prefab, I would duplicate the object, change its name, and then make sure the sprite image matches up well with your collider. Once it all aligns well, turn it into a prefab (remember to change the name so it doesnt save over the original!)

Then, try the arrow on the new prefab.

Fixed it, it was an issue with the arrow not being accurate, had to change a command from transform.up, to “transform.right” for one of the scripts (Something to do with the direction that the arrow prefab is facing).

1 Like