# Help: Rotating a Blueprint with another BP

**URL:** <https://forums.unrealengine.com/t/help-rotating-a-blueprint-with-another-bp/23660>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [March 10, 2015, 1:24pm UTC](https://forums.unrealengine.com/t/help-rotating-a-blueprint-with-another-bp/23660 "2015-03-10T13:24:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [March 10, 2015, 1:24pm UTC](https://forums.unrealengine.com/t/help-rotating-a-blueprint-with-another-bp/23660/1 "2015-03-10T13:24:11Z")

</div>

Hi All

I am spawning Blueprint in the Level and would like them to spin on the spot.

Tried this, no luck. Runs off event tick.

 ![Capture.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/e/be6b0695f6f26c14fa8ec0f80f9e5d99f2cef2a9.jpeg)

Any Ideas

---

<div class="post-metadata">

**Author:** ![originalbadboy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@originalbadboy](https://forums.unrealengine.com/u/originalbadboy)\
**Post date:** [March 10, 2015, 1:44pm UTC](https://forums.unrealengine.com/t/help-rotating-a-blueprint-with-another-bp/23660/2 "2015-03-10T13:44:24Z")

</div>

Two things:

The rotation code should be in the actual BP rather than where you are spawning it … OO code and all that …

Rotating the character requires you to get the current character and add a rotator value to that, times the delta , which you can get from the event tick. I dont have the editor installed on my work machine so cant provide screenshots. You also might want to consider a speed float so you can vary it, which would be times the delta .

A basic version can be seen here:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/9/589a08ea235d8c587ac9ec449da92b7ad2d192c4.jpeg "How to create a spinning mesh in Unreal Engine 4 - UE4") ](https://www.youtube.com/watch?v=iA2_RLpbZrI)

You can also add a rotating component to the actor if you want the simple approach:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [March 10, 2015, 1:48pm UTC](https://forums.unrealengine.com/t/help-rotating-a-blueprint-with-another-bp/23660/3 "2015-03-10T13:48:27Z")

</div>

That is a shame. Could I do this with a Static mesh instead?

If so, how to spawn a static mesh?

![b445697e25b8189ccccc5d9c1b2f88260719a311.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/4/b445697e25b8189ccccc5d9c1b2f88260719a311.jpeg)

Thanks for the help

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [March 10, 2015, 1:49pm UTC](https://forums.unrealengine.com/t/help-rotating-a-blueprint-with-another-bp/23660/4 "2015-03-10T13:49:59Z")

</div>

Or would I add all 18 static meshes in to the BP and do it that way.

I am testing for now, because later there should be 100+

---

<div class="post-metadata">

**Author:** ![originalbadboy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@originalbadboy](https://forums.unrealengine.com/u/originalbadboy)\
**Post date:** [March 10, 2015, 1:53pm UTC](https://forums.unrealengine.com/t/help-rotating-a-blueprint-with-another-bp/23660/5 "2015-03-10T13:53:22Z")

</div>

Your FighterBP should have the static mesh already inside it (I am assuming thats what you are doing as it wouldnt make sense to do it any other way)…

You just need to add the code on the BP instead. You could of course add the rotation code to current BP above, but as stated that’s not very well designed. Both examples given should get you started.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [March 10, 2015, 2:06pm UTC](https://forums.unrealengine.com/t/help-rotating-a-blueprint-with-another-bp/23660/6 "2015-03-10T14:06:19Z")

</div>

My only thing I can see being a problem, is that with 100 of these that I would have to cast to everyone one of them when I need them

To summarise, they will be spinning on the spot like a display in a store, but later on they will be used for fighting and other tasks. So I would have to tell everyone one of them when to start and stop spinning.

That way, I thought I should Spin the Static mesh instead of the BP.

I will look in to it further, Thank for advise.

---

<div class="post-metadata">

**Author:** ![Syntaks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Syntaks](https://forums.unrealengine.com/u/Syntaks)\
**Post date:** [March 10, 2015, 4:43pm UTC](https://forums.unrealengine.com/t/help-rotating-a-blueprint-with-another-bp/23660/7 "2015-03-10T16:43:27Z")

</div>

What about just using Add Actor Local Rotation instead of Set Actor Rotation? Then I don’t think you need to keep track of it’s current rotation.

> **[AddActorLocalRotation](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Utilities/Transformation/AddActorLocalRotation/)**
>
> AddActorLocalRotation

---

<div class="post-metadata">

**Author:** ![originalbadboy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@originalbadboy](https://forums.unrealengine.com/u/originalbadboy)\
**Post date:** [March 10, 2015, 5:38pm UTC](https://forums.unrealengine.com/t/help-rotating-a-blueprint-with-another-bp/23660/8 "2015-03-10T17:38:23Z")

</div>

> [@;243140](#):
>
> My only thing I can see being a problem, is that with 100 of these that I would have to cast to everyone one of them when I need them
> 
> To summarise, they will be spinning on the spot like a display in a store, but later on they will be used for fighting and other tasks. So I would have to tell everyone one of them when to start and stop spinning.
> 
> That way, I thought I should Spin the Static mesh instead of the BP.
> 
> I will look in to it further, Thank for advise.

How are you keeping a track of all these objects? … Might be worth considering putting them into an array, if you need to iterate through them quickly all at once you just create a for loop and run what you need to on each. Also what will initiate them to ‘start fighting’ a collision? Or the player being a certain distance away? Or something else?

Create a function in the FighterBP that does the other tasks, and then call that when the condition is true, either automatically from a collision or ray trace if you are doing a distance check. This can be part of the BP for FighterBP, that way you don’t need to worry about iterating through each one, they will just look after themselves and be automated. That of course might not be what you were trynig to achieve.
