Question about sword rotation #545
-
@zicklag do you have any ideas why sword rotating like this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Maybe this has to do with the anchor of the sprite? |
Beta Was this translation helpful? Give feedback.
-
Even without rotation, I've noticed that for some reason, if I pick up and grab a sword over and over, you can see the flash of a frame where the sword get's parented/deparented to the player, but it doesn't update the sword animation immediately, and you can see the sword either floating above the player's head when picking up ( for just a single frame ) or floating below the players feet when dropping. I'm not sure if that's related or not. Actually looking at the Gif, I think that the sword is flinging around because the at-rest sword sprite isn't centered in it's bounding box: Maybe we need to center the sword in that box? I think it'd still rotate, so we'd need to figure out how to make that stop rotating when dropped in place, but maybe it wouldn't rotate if the collision box was centered with the sprite? |
Beta Was this translation helpful? Give feedback.
Even without rotation, I've noticed that for some reason, if I pick up and grab a sword over and over, you can see the flash of a frame where the sword get's parented/deparented to the player, but it doesn't update the sword animation immediately, and you can see the sword either floating above the player's head when picking up ( for just a single frame ) or floating below the players feet when dropping.
I'm not sure if that's related or not.
Actually looking at the Gif, I think that the sword is flinging around because the at-rest sword sprite isn't centered in it's bounding box:
Maybe we need to center the sword in that box?
I think it'd still rotate, so we'd need to figure out how to…