Rotate object by following mouse position

I need an object/group to rotate by following the current mouse position while it moves.


The user can drag the red cone and move mouse around. The group which consists of the cone, the ‘main figure’ and the 2D text should move such that the cone always looks at the current mouse position.

My code to achieve this is like this but the rotation behavior is not optimal as the rotation is not “smooth”:

let intersect = this.raycaster.intersectObject(this.scene.ground)[0];
const directionVector = intersect.point.clone();
directionVector.y = 0;

Just an addition: I observed that the mouse position and the red cone vector (relative to main figure) is 90°.

Sorry for the noise.
An additional


seems to fix the issue (90° offset) but I am not sure what is happening here.