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

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

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 -

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

How about mouse delta:

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?

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.

As above then. You originally said without lmb.

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

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:

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

1 Like

This looks great, thanks alot for the effort

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?

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

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

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

image

1 Like