Player Attack hitbox/collider error

Howdy yall, I am having some trouble when I move my player from the (0,0) origin. The attack I ahve est up just doesn’t want to work, it gets offset in someway or direction that I’m not sure of and thrwos the whole game out of wack. I have a video showing the problem and the code for it. Sorry in advance for the really bad mic quality, my laptop doesn’t have the greatest one. Thanks in advance for any help.

swordattack.cs Line23

you save the right attack offset as transform’s world position

swordattack.cs line30 + 36

you set the transform’s local position to the right attack offset

just save the offset as transform’s local position or something

actually thank you so much, worked perfectly! :smile:

1 Like