So odd thing that is happening with my sword. I decided to copy paste the code but the issue is still there. (Hopefully the screenshots work.)
It seems that the Z rotation on Active weapon is connected to my Mouse?
So odd thing that is happening with my sword. I decided to copy paste the code but the issue is still there. (Hopefully the screenshots work.)
It seems that the Z rotation on Active weapon is connected to my Mouse?
What’s in the Sword
script?
Yeah, sword looks ok. Perhaps share ActiveWeapon
, too. I can see in the code now that the active weapon is the one being manipulated
Also, check this: How to apply code formatting within your post
Makes it easier to read the code, as well as copy-and-paste code if I need to respond with a snippet.
Unlike 3d, 2d rotations are actually supposed to be on the Zed axis.
In 3d style games, “up” is the Y axis and the “ground” is the X-Z plane, that is we move left and right in the X, and forward and back in the Z. If we wanted to turn, we would turn about the Y axis.
In 2d style games,we move left and right in the X, and up and down in the Y. If we want to turn (rotate), we do so along the Z axis.
In this case, it looks like the sword GameObject isn’t being moved by the animation, which would indicate that instead, the ActiveWeapon GameObject is. Is your Animator on the Sword or the ActiveWeapon?