# How perform for obj follow mouse with angle?

how i can perform for sprite follow mouse if i change angle ? If i change angle the sprite no more follow mouse correctly. I absolutely need the obj follow mouse with pivot.

https://jsfiddle.net/jonforum/ow9w7rfz/10/

thank a lot for help

edit: if you can help me with math problem !

How i can compute from a sprite (radian.skew,pivot) a new point XY ?

Example i move pivot to XY. And i move rotation to ( randian || degree ) After i move again pivot with mouse compute... all became weird..

How i can compute rotation but base on the position from pivot ? for now here it my try code. thank guys, i have difficult with deep math. Also, I would like to compute skew

// add a graphics instance
var rec = new PIXI.Graphics();
rec.beginFill(0x00ff00);
rec.drawRoundedRect(-20, -65/2, 40, 65, 4); // Shifted so the rect is centered across 0,0

// setup
rec.pivot.set(0,0);                         // Pivot at the center 0,0
rec.position.set(500/2,500/2);
rec.rotation = 45 * Math.PI / 180;
renderer.render(stage);

//** listener ********
var updatePosition = function(event) {
this.position.set(event.layerX,event.layerY); // Set postion, no offset.

renderer.render(stage);
};