# I don't understand why I can't set the rotation of an AI

**URL:** <https://forums.unrealengine.com/t/i-dont-understand-why-i-cant-set-the-rotation-of-an-ai/302167>\
**Category:** AI\
**Tags:** control-rotation, unreal-engine, question\
**Created:** [December 21, 2014, 8:59am UTC](https://forums.unrealengine.com/t/i-dont-understand-why-i-cant-set-the-rotation-of-an-ai/302167 "2014-12-21T08:59:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asher\_S\_Einhorn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Asher\_S\_Einhorn](https://forums.unrealengine.com/u/Asher_S_Einhorn)\
**Post date:** [December 21, 2014, 8:59am UTC](https://forums.unrealengine.com/t/i-dont-understand-why-i-cant-set-the-rotation-of-an-ai/302167/1 "2014-12-21T08:59:43Z")

</div>

When my character fires at the player I want to rotate them to face the player. Simple enough.

But nothing works, setting the actor rotation doesn’t work, and neither does setting the control rotation. the node is definitely being hit and nothing anywhere else is even touching rotation. Any help would be much appreciated.

![24644-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/2/a/32a0e1a5b24b417d0334d23671449eafa346e514.png)

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [December 21, 2014, 10:06am UTC](https://forums.unrealengine.com/t/i-dont-understand-why-i-cant-set-the-rotation-of-an-ai/302167/2 "2014-12-21T10:06:10Z")

</div>

Hey (:

Controller rotation won’t turn the character as far as i know. You are only turning the controller. For example if you turn him 90° clockwise, your forward action will move him sideways. At least that’s what i learned when creating my Legend of Zelda movement.

If you want the actual character to turn, you need to set it’s World Rotation.  
Could you show me how you setup the Rotation change? Can you also check that your “New Rotation” isn’t your old one due to a calculation error?

If you post a picture of your blueprints, please include more than just 1 1/2 node x) I can’t see anything on this screen.

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [December 21, 2014, 6:24pm UTC](https://forums.unrealengine.com/t/i-dont-understand-why-i-cant-set-the-rotation-of-an-ai/302167/3 "2014-12-21T18:24:41Z")

</div>

In case of AI control rotation is being calculated on the fly based on path following, its setup, and desired focus. Try using `SetFocus` and `SetFocalPoint`.

Cheers,

–mieszko

---

<div class="post-metadata">

**Author:** ![Asher\_S\_Einhorn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Asher\_S\_Einhorn](https://forums.unrealengine.com/u/Asher_S_Einhorn)\
**Post date:** [December 21, 2014, 8:34pm UTC](https://forums.unrealengine.com/t/i-dont-understand-why-i-cant-set-the-rotation-of-an-ai/302167/4 "2014-12-21T20:34:19Z")

</div>

that did the trick! thanks once more for the info Mieszko.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [December 2, 2017, 5:37am UTC](https://forums.unrealengine.com/t/i-dont-understand-why-i-cant-set-the-rotation-of-an-ai/302167/5 "2017-12-02T05:37:36Z")

</div>

Someone should mark this as the answer. It’s been a while hehe. (Hey Mieszko! Can you get back on the stream with something fun?)

---

<div class="post-metadata">

**Author:** ![INTERESTING\_2016](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/interesting_2016/32/551537_2.png) [@INTERESTING\_2016](https://forums.unrealengine.com/u/INTERESTING_2016)\
**Post date:** [March 27, 2023, 1:38pm UTC](https://forums.unrealengine.com/t/i-dont-understand-why-i-cant-set-the-rotation-of-an-ai/302167/6 "2023-03-27T13:38:46Z")

</div>

That’s worked!  
Thank you.
