Have a sword rotate around the player

Hello! I want to make something similar to Archvale’s weapon rotation. Can you guys point me towards on how to acheive it? The rotation around the player, and the how the sword also responds to the rotation.

@PrimedAlpha I’m trying to achieve the same thing, and found this snip of code that gets us closer to the desired behavior… but I’m still trying to figure out how to get that excellent swinging animation and having the sword rendering on the “far” side of the player from the mouse… Good luck and let me know if this helps/if you find anything else!

// Point you want to have sword rotate around
 public Transform shoulder;
 // how far you want the sword to be from point
 public float armLength = 1f;
 void Start() {
     // if the sword is child object, this is the transform of the character (or shoulder)
     shoulder = transform.parent.transform;
 }
 void Update() {
     // Get the direction between the shoulder and mouse (aka the target position)
     Vector3 shoulderToMouseDir = 
         Camera.main.ScreenToWorldPoint(Input.mousePosition) - shoulder.position;
     shoulderToMouseDir.z = 0; // zero z axis since we are using 2d
     // we normalize the new direction so you can make it the arm's length
     // then we add it to the shoulder's position
     transform.position = shoulder.position + (armLength * shoulderToMouseDir.normalized);
 }

@PrimedAlpha, They’re probably using an animation track to do that.

I am not familiar enough with those, but you’d do well do check that out - it’s probably the best way to do it:

There are tons of videos tutorials on youTube.