# How to implement object rotation similar to Sketchfab's 3D models?

**URL:** <https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [May 30, 2023, 5:49am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078 "2023-05-30T05:49:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Graeme\_VR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graeme_vr/32/615812_2.png) [@Graeme\_VR](https://forums.unrealengine.com/u/Graeme_VR)\
**Post date:** [May 30, 2023, 5:49am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078/1 "2023-05-30T05:49:58Z")

</div>

I would like to enable users to rotate a shoe in my Unreal Engine scene in a similar way to the Sketchfab example found here: [Shoe - Buy Royalty Free 3D model by R0m1R [1d5d1d0] - Sketchfab Store](https://sketchfab.com/3d-models/shoe-1d5d1d0e0f2d43d7a9e0f244d509ac64)

Currently, when the user approaches the shoe, a menu appears that allows them to rotate and zoom the shoe. However, I’m having trouble achieving the same intuitive and easy rotation experience as in Sketchfab. I’m wondering if it’s possible to implement this functionality without requiring the user to hold down the left mouse button and move the mouse, as is done in Sketchfab, Please see blueprints I have so far -

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/6/2568b61c03bf68281f28d6762ab0c906b8149208.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/9/739611a25cbc14261f820b1a899ea4880a8b96a4.png)

Anybody know where I 'm going wrong? Any help would be appreciated, thanks

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 30, 2023, 7:17am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078/2 "2023-05-30T07:17:24Z")

</div>

> [@Graeme\_VR](#):
>
> Any help would be appreciated

How about mouse delta:

> [@Rotate an object in all directions using the mouse](https://forums.unrealengine.com/t/rotate-an-object-in-all-directions-using-the-mouse/463545/2):
>
> Rotating an object is rather straighforward: [[Image from Gyazo]](https://gyazo.com/f1e0aae3a4e579adf7cb83323e43e9a1) After that, the user needs to be able to click on certain areas of the object Child Actors Components sound like the most obvious solution if the attached elements need to define their own unique logic. Depending on what is required (complexity of the shape of the object, modularity, scope) you could have sockets on a static mesh and add Child Actors Components procedurally. I can’t use the default templa…

Incorporate `rInterp` to achieve the _smooth_ result.

* * *

> I’m wondering if it’s possible to implement this functionality without requiring the user to hold down the left mouse button and move the mouse, **as is done in Sketchfab**

Regarding this: so… how is this supposed to work? Because I must hold lmb and provide input in sketchfab viewer. What am I missing?

---

<div class="post-metadata">

**Author:** ![Graeme\_VR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graeme_vr/32/615812_2.png) [@Graeme\_VR](https://forums.unrealengine.com/u/Graeme_VR)\
**Post date:** [May 31, 2023, 5:11am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078/3 "2023-05-31T05:11:42Z")

</div>

Thanks for feedback. Th sketchfab viewer lets the user rotate the shoe and zoom using lmb. I want to replicate this movement and rotation in Unreal Engine with the same intuitiveness.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 31, 2023, 5:14am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078/4 "2023-05-31T05:14:13Z")

</div>

As above then. You originally said **without** lmb.

---

<div class="post-metadata">

**Author:** ![Graeme\_VR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graeme_vr/32/615812_2.png) [@Graeme\_VR](https://forums.unrealengine.com/u/Graeme_VR)\
**Post date:** [May 31, 2023, 10:13am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078/5 "2023-05-31T10:13:32Z")

</div>

Thanks, sorry I meant I didnt want to use the lmb, thanks again.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 31, 2023, 10:23am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078/6 "2023-05-31T10:23:27Z")

</div>

Hook it up to tick, sample mouse delta. The example I provided already works like that. LMB is only to select an object to demo it.

* * *

With interp worked in:

 ![Screenshot_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/a/d2aa800ab680eb75008d3e01f21adbc2534b7643.png)

This is using world axis, no gimbal lock since we’re adding. The interp acts as a dampener.

---

<div class="post-metadata">

**Author:** ![Graeme\_VR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graeme_vr/32/615812_2.png) [@Graeme\_VR](https://forums.unrealengine.com/u/Graeme_VR)\
**Post date:** [June 6, 2023, 5:23am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078/7 "2023-06-06T05:23:58Z")

</div>

This looks great, thanks alot for the effort

---

<div class="post-metadata">

**Author:** ![Graeme\_VR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graeme_vr/32/615812_2.png) [@Graeme\_VR](https://forums.unrealengine.com/u/Graeme_VR)\
**Post date:** [June 6, 2023, 5:42am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078/8 "2023-06-06T05:42:10Z")

</div>

I tried to add your blueprint to mine. I cant seem to get Event Tick. How do I connect your blueprint to mine so its works? Also in your blueprint, is the New Variable a rotator and speed variable a float?

 ![turn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/9/489692f0232e464fc984edcd9ac92426f64adfbf.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 6, 2023, 6:07am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078/9 "2023-06-06T06:07:08Z")

</div>

You can’t have tick inside a function. Run the entire function on Tick instead. And yes, float, rotator.

---

<div class="post-metadata">

**Author:** ![Graeme\_VR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graeme_vr/32/615812_2.png) [@Graeme\_VR](https://forums.unrealengine.com/u/Graeme_VR)\
**Post date:** [June 6, 2023, 6:58am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078/10 "2023-06-06T06:58:03Z")

</div>

How would I run the entire function on a tick, please can you show me what the blueprint would look like?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 6, 2023, 7:28am UTC](https://forums.unrealengine.com/t/how-to-implement-object-rotation-similar-to-sketchfabs-3d-models/1183078/11 "2023-06-06T07:28:40Z")

</div>

Connect the function to the Tick event in the main graph:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/0/fd077e5f71d357d276d8ecde159333b0cdcde5ef.png)
