# Rotation Control with Sphere

**URL:** <https://forum.babylonjs.com/t/rotation-control-with-sphere/42615>\
**Category:** Questions\
**Created:** [July 21, 2023, 1:04pm UTC](https://forum.babylonjs.com/t/rotation-control-with-sphere/42615 "2023-07-21T13:04:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![devAxeon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/devaxeon/32/524_2.png) [@devAxeon](https://forum.babylonjs.com/u/devAxeon)\
**Post date:** [July 21, 2023, 1:04pm UTC](https://forum.babylonjs.com/t/rotation-control-with-sphere/42615/1 "2023-07-21T13:04:42Z")

</div>

Hi !!

I want to control the rotation of a mesh by a simple Drag&Drop on a sphere around that mesh  
But I have pain with calculating the good rotation to apply…

Here’s a playground of what I’ve done for now:

> **[Babylon.js Playground](https://playground.babylonjs.com/#NELNGC)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Thank you

---

<div class="post-metadata">

**Author:** ![xiehangyun](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/xiehangyun/32/30777_2.png) [@xiehangyun](https://forum.babylonjs.com/u/xiehangyun)\
**Post date:** [July 21, 2023, 5:27pm UTC](https://forum.babylonjs.com/t/rotation-control-with-sphere/42615/2 "2023-07-21T17:27:29Z")

</div>

[Rotation Control Sphere | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#NELNGC#5)  
I guess this is the result you want?

---

<div class="post-metadata">

**Author:** ![devAxeon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/devaxeon/32/524_2.png) [@devAxeon](https://forum.babylonjs.com/u/devAxeon)\
**Post date:** [July 21, 2023, 5:52pm UTC](https://forum.babylonjs.com/t/rotation-control-with-sphere/42615/3 "2023-07-21T17:52:57Z")

</div>

Yes !! Thank you so much, I’ve search for so many other ways to do it, and it was “just” one missing line, but THE line 😂
