Hi!

I'm making my own version of an engine like Box2D, and I've got the gravity, bouncing, dragging working, but I'd like to add some rotating when a user clicks on an object.

Example, there's a rectangular mc on the stage and you press the upper left corner. The mc can at that point be dragged around I would like it to rotate around the point clicked.

There's already a variable containing things like current / previous x & y position and the speed by which it is moving, so it's just the code to determine the rotating point and the degree of rotation.

Anyone with a brain full of math that can assist me on this?