# Random Rotation Smooth

**URL:** <https://forums.unrealengine.com/t/random-rotation-smooth/462994>\
**Category:** Community & Industry Discussion\
**Tags:** rotation, random, unreal-engine, question\
**Created:** [March 28, 2020, 6:07pm UTC](https://forums.unrealengine.com/t/random-rotation-smooth/462994 "2020-03-28T18:07:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zefyr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zefyr](https://forums.unrealengine.com/u/Zefyr)\
**Post date:** [March 28, 2020, 6:07pm UTC](https://forums.unrealengine.com/t/random-rotation-smooth/462994/1 "2020-03-28T18:07:04Z")

</div>

Hi!  
So I was trying to make a random rotation for an IA, but with a smooth. Right now I have a random rotation but when it changes it snaps and I want to avoid it.

Anyone can help me?

Thanks!  
298657-  
][1]

---

<div class="post-metadata">

**Author:** ![Przemek2222](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Przemek2222](https://forums.unrealengine.com/u/Przemek2222)\
**Post date:** [March 28, 2020, 6:50pm UTC](https://forums.unrealengine.com/t/random-rotation-smooth/462994/2 "2020-03-28T18:50:20Z")

</div>

Hello,

I think you can give InterpTo() a chance.

Some tutorial:

> **[The Subtle Magic of InterpTo() in Unreal Engine 4](https://www.unrealengine.com/en-US/blog/the-subtle-magic-of-interpto)**
>
> There’s a certain amount of craftsmanship involved in making things move around algorithmically.  Getting a camera to slide smoothly into position, gliding on the gossamer wings of math, can be a perilous underataking.  One wrong wobble,...

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 28, 2020, 8:15pm UTC](https://forums.unrealengine.com/t/random-rotation-smooth/462994/3 "2020-03-28T20:15:26Z")

</div>

Like this:

 ![298678-randomrotation.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/0/4e00719775cd4020f5902fd2d1c8f5e0df269ea1.jpeg)

( I would upload a gif of it working, but the server’s a bit f\*\*cked at the moment ).

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 28, 2020, 8:56pm UTC](https://forums.unrealengine.com/t/random-rotation-smooth/462994/4 "2020-03-28T20:56:07Z")

</div>

![298690-cube.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/b/73b55d6179355780694885bc1232fd8d3c256d17.gif)

---

<div class="post-metadata">

**Author:** ![Zefyr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zefyr](https://forums.unrealengine.com/u/Zefyr)\
**Post date:** [March 28, 2020, 9:41pm UTC](https://forums.unrealengine.com/t/random-rotation-smooth/462994/5 "2020-03-28T21:41:54Z")

</div>

It works ! But it goes a little bit fast. Could it be because of my Timeline? Also sometimes it rotates a lot!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 28, 2020, 9:51pm UTC](https://forums.unrealengine.com/t/random-rotation-smooth/462994/6 "2020-03-28T21:51:56Z")

</div>

I set my timeline to 2 seconds. Great thing is, you can also randomize the timeline, so you get a random angle and a random amount of time to get there…

Each time around, before the timeline, say:

![298692-rate.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/8/4389b377c73266ba9967abb832f91bacce869595.jpeg)

Obviously you have to use your timeline component refernce ( I don’t know what you called your timeline ), and you have to tweak the numbers to get what you want…

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 28, 2020, 9:53pm UTC](https://forums.unrealengine.com/t/random-rotation-smooth/462994/7 "2020-03-28T21:53:55Z")

</div>

PS: It’s better with a smooth timeline curve. You just right click and the points and choose ‘auto’:

 ![298693-smooth.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/6/24641340671c8bad2383e66b876e901b56bdd217.jpeg)

---

<div class="post-metadata">

**Author:** ![Wrath\_PI](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wrath_pi/32/897906_2.png) [@Wrath\_PI](https://forums.unrealengine.com/u/Wrath_PI)\
**Post date:** [February 14, 2024, 7:47pm UTC](https://forums.unrealengine.com/t/random-rotation-smooth/462994/8 "2024-02-14T19:47:23Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/a/d3a1d81c12b507fa2b78d471c81f077d32451177.png)  
Accidental discovery. It works very nicely.
