I’m working on a topdown dungeon crawler which features realistic physics; instead of pressing a button to swing your sword, you move your mouse in a circle around the player to get it to swing the sword in a circular manner.
The player’s hand(with a weapon attached via fixed joint) rotates around the player to face the mouse pointer. I’ve got this to work with Rigidbody 2d rotate, but the physics get really weird. I plan to make damage be relative to the speed of the weapon, this could be super broken considering the instant acceleration of rb rotate.
Using torque, however, I’ve gotten the physics to work perfectly. The caveat being that I’ve gotten stuck making the hand(with weapon) face towards the mouse pointer. How would I set the torque of the hand object to where it points towards the mouse pointer while following physics(speed, acceleration based on the weight of the sword, etc.)?
Thank you so much for your time ![]()