# Limit Rotation Range 180°

**URL:** <https://forums.unrealengine.com/t/limit-rotation-range-180/453337>\
**Category:** Community & Industry Discussion\
**Tags:** rotation, limitation, unreal-engine, question\
**Created:** [August 4, 2019, 9:46am UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337 "2019-08-04T09:46:46Z")\
**Posts on this page:** 20\
**Page:** 2

<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:** [August 4, 2019, 1:52pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/21 "2019-08-04T13:52:37Z")

</div>

We’re on the right track! Just change the axis in the BP. Instead of Z, try X or Y.

---

<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:** [August 4, 2019, 1:53pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/22 "2019-08-04T13:53:22Z")

</div>

Yes, you have to juggle interp speed and the timing of the SetTimerByEvent…

---

<div class="post-metadata">

**Author:** ![linkings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@linkings](https://forums.unrealengine.com/u/linkings)\
**Post date:** [August 4, 2019, 2:27pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/23 "2019-08-04T14:27:01Z")

</div>

It works on the X axis

- How can It rotate from the the bottom of the needle?
- In-game, it is 90 degrees different than in editor. How can I match it up?
- Should something be written in this variable range?

![284125-var.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/4/b5490867e98e2e7ab222ecad29a7735745dd679a.jpeg)

---

<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:** [August 4, 2019, 2:40pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/24 "2019-08-04T14:40:41Z")

</div>

To rotate a component from a different point do this:

1. add a sphere to your BP ( make it hidden in game and make it small enough etc )
2. drag the sphere around until it’s at the point you want the arrow to rotate from
3. attach the arrow to the sphere ( drag the arrow onto the sphere in the components view ( not the viewport ), the spher becomes it’s parent.
4. change the code to rotate the sphere, not the arrow.

Now the arrow is rotating from the point you want, but only because it’s connected to the sphere.

That’s basically it, BUT, moving the components around may have changed their default rotation. To check ( we’re only interested in the sphere now ) select the sphere and look at the details panel, the rotation should be all zeros.

If it’s not, the code will behave in a weird way. Tell me if that’s the case ( getting tired of typing now… 🙂

---

<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:** [August 4, 2019, 2:44pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/25 "2019-08-04T14:44:18Z")

</div>

( or, you can just move the pivot point of the arrow mesh, if you know how to do that… )

---

<div class="post-metadata">

**Author:** ![linkings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@linkings](https://forums.unrealengine.com/u/linkings)\
**Post date:** [August 4, 2019, 2:47pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/26 "2019-08-04T14:47:23Z")

</div>

Tried it with the SceneComponent 🙂 will try this aswell. Now here are the results so far

(i’ll design the needle better later as this is just for troubleshooting…):

![284127-pivot.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/d/4ad584b024d38ee9de84d637da944ee0f540e68a.gif)

i tried the SceneComponent but it looked like it’s stuck when rotating on X/Y/Z

 ![284128-90deg2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/9/8c96911d69e3dc336906c6b4bdfd6a6a7997f6e7.jpeg)

Actor rotated 90 deg away in editor to show correctly in game.

 ![284129-90deg.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/5/8/6584b20c660af2b2d00065ef74e9c268eacd3557.jpeg)

These are the rest of my settings.

 ![284130-set90.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/e/39e4f4a4c2a6269d7947fa8e460b5443dbccfdba.jpeg)

---

<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:** [August 4, 2019, 2:50pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/27 "2019-08-04T14:50:09Z")

</div>

Yes, scene component or sphere, doesn’t matter. but it looks like it’s still rotation from the center. The code should be talking to the sphere / scene and not the needle any more…

---

<div class="post-metadata">

**Author:** ![linkings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@linkings](https://forums.unrealengine.com/u/linkings)\
**Post date:** [August 4, 2019, 3:00pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/28 "2019-08-04T15:00:24Z")

</div>

Sphere is target now (Y axis) but doesn’t react. I know what you mean. Gonna play around for a minute!

---

<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:** [August 4, 2019, 3:02pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/29 "2019-08-04T15:02:43Z")

</div>

Did you attach the arrow to the sphere…? ( in the components view, top left )

---

<div class="post-metadata">

**Author:** ![linkings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@linkings](https://forums.unrealengine.com/u/linkings)\
**Post date:** [August 4, 2019, 3:19pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/30 "2019-08-04T15:19:48Z")

</div>

Yes my man…check out this epicness! 😃

![284133-w22.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/1/e912ee127ae114f0a8b72dead9752903e5d69afe.gif)

With the arrow it’s just perfect. **Thanks so much for this feature** …  
The other essential would be to change the clock text randomly on a triggerbox overlap… you’re invited to help figuring out this one too… I’m a total beginner, so your BP knowledge is just great… and your username fits the topic … doesn’t it? lol

---

<div class="post-metadata">

**Author:** ![linkings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@linkings](https://forums.unrealengine.com/u/linkings)\
**Post date:** [August 4, 2019, 3:23pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/31 "2019-08-04T15:23:06Z")

</div>

Can you convert your Blueprint comment into an answer so I can mark it as solved?

Thanks so much!

---

<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:** [August 4, 2019, 3:26pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/32 "2019-08-04T15:26:22Z")

</div>

Better start a new thread if you wanna ask about the clockface! ( I can’t see any text there, maybe it’s moving too quickly ).

---

<div class="post-metadata">

**Author:** ![linkings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@linkings](https://forums.unrealengine.com/u/linkings)\
**Post date:** [August 4, 2019, 3:28pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/33 "2019-08-04T15:28:01Z")

</div>

Yes please convert your BP comment to an answer so I can mark it as solved! 🙂

It’s just the same letter just for design. They should be randomly generated up to 1-6 characters in alien letters. (The font is ready)

You can find the other thread here:

> **[Clock face/ Spawn random text in each TextRender cipher](https://forums.unrealengine.com/questions/913655/view.html)**
>
> Edit: The TextRender components should move with the mesh but not rotate themselves I’d like to make the circular ring of my BP actor look like this: You see the text does not face with its bottom to the ring, their angles stay should steady. ...

 ![284042-changetophalftextsonoverlap.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/1/681155c0f47c63c1b62c0b8e2cdc3b7bf2fd35d6.png)

---

<div class="post-metadata">

**Author:** ![linkings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@linkings](https://forums.unrealengine.com/u/linkings)\
**Post date:** [August 4, 2019, 3:29pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/34 "2019-08-04T15:29:37Z")

</div>

> **[Clock face/ Spawn random text in each TextRender cipher](https://forums.unrealengine.com/questions/913655/view.html)**
>
> Edit: The TextRender components should move with the mesh but not rotate themselves I’d like to make the circular ring of my BP actor look like this: You see the text does not face with its bottom to the ring, their angles stay should steady. ...

Cheers 🙂

---

<div class="post-metadata">

**Author:** ![linkings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@linkings](https://forums.unrealengine.com/u/linkings)\
**Post date:** [August 5, 2019, 2:20pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/35 "2019-08-05T14:20:38Z")

</div>

One question about SetRelativeRotation: How can I set it to a better SetRelativeLocation to make an arrow move up and down smoothly?

(It’s too steppy)

![284220-jzmpy.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/3/a6381b5c34bc4c12f55822c86a6946b71241d766.gif)

Thanks!

 ![284231-updown.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/f/b/ffbc8052fdef27aa21e7974d87a49bfb2c85b07e.png)

---

<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:** [August 5, 2019, 3:00pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/36 "2019-08-05T15:00:07Z")

</div>

Remember, you need to juggle the settimerbyevent and the interp time. The set timer needs to give the interp enough time to happen… ( you have two arrows now? )

---

<div class="post-metadata">

**Author:** ![linkings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@linkings](https://forums.unrealengine.com/u/linkings)\
**Post date:** [August 5, 2019, 3:33pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/37 "2019-08-05T15:33:26Z")

</div>

Second arrow should only poke the upper ring… 🙂 up / down in random time + same speed.

Let’s see… but i can’t get it smooth… which values would you recommend?  
Must i remove the -90/+90 clamp and Target Rotation var?

 ![284238-rem.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/6/3/9633539735cad6f0e3efa6f9cbc517a8014813b8.png)

---

<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:** [August 5, 2019, 5:41pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/38 "2019-08-05T17:41:43Z")

</div>

No, if you remove this stuff, the first arrow stop working. I’m not seeing code for the second arrow?..

---

<div class="post-metadata">

**Author:** ![linkings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@linkings](https://forums.unrealengine.com/u/linkings)\
**Post date:** [August 5, 2019, 6:15pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/39 "2019-08-05T18:15:32Z")

</div>

It’s an own Blueprint. Rotating needle has been duplicated:

![284243-bpsep.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/f/0/6f007e949c2a0ae8c9dcf0505ca29677b8d8d4cf.jpeg)

Instead of rotation - Red should move up and down smoothly

---

<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:** [August 5, 2019, 7:59pm UTC](https://forums.unrealengine.com/t/limit-rotation-range-180/453337/40 "2019-08-05T19:59:20Z")

</div>

Ah, sorry, yes see it now… I think the timer is firing too quickly for the finterp to catch up ( like I said ;). I will show you another way with a timeline ( gimme 5 )

[Previous page](https://forums.unrealengine.com/t/limit-rotation-range-180/453337.md?page=1)

[Next page](https://forums.unrealengine.com/t/limit-rotation-range-180/453337.md?page=3)
