You can use
ModItem.UseStyle() to modify the visual location and visual rotation of swung weapons. To do this, you change the value of player's
Player.itemLocation and
Player.itemRotation, typically based on values of
Player.itemAnimation and
Player.itemAnimationMax.
If you don't feel like figuring all of that out, here is a formula thingy I made:
C#:
public override void UseStyle(Player player, Rectangle heldItemFrame)
{
float xOffset = 0; // How much farther away from the player you want your item to visually be
float yOffset = 0; // How much lower you want your item to visually be
Vector2 itemOffset = new Vector2(xOffset * player.direction, yOffset).RotatedBy(player.itemRotation);
player.itemLocation += itemOffset;
}
Just copy and paste this into your
ModItem's class and change the values of
xOffset and
yOffset to position your item how you would like!
Increasing the value of
xOffset will move the item farther away from the player (you probably want a negative number), and increasing the value of
yOffset will move the item more downward (you may want a positive number).