# How do I set up an object to rotate in place?

'Ello there!
I’m having trouble in blueprint in getting my “Coin” object to rotate in place. It’s not doing anything. Zilch. Nudda. I seriously don’t understand what I’m doing wrong and it’s making me pull my hair out!

All I want it to do is rotate in place, like the coins in the tutorial do.

Still isn’t rotating. I’m not sure why, I emulated your example perfectly and it’s just not having any of it.

Hi there,
I think the main problem is you are firing your rotation off the wrong event. Currently, it’s rotating just once at the beginning of play. Instead, if you want it to keep rotating, you’ll need to key it off of an event that is going to keep repeating, like a tick. Like this:

Good luck!

3 Likes

YawPerSecond was just a variable that I made to hold the amount that you want the coin to turn per second. So, you should be able to set that to a higher value if you want the coin to turn faster and vice versa for slower.

Awesome. Happy to help.

Got it working! I altered Yaw Per Second to Game Time and it’s working, just very slowly. How would I speed up the rotation?

Thanks man! Works great.

What is the X Add Input and the Yaw Per Second made from. I got lost here trying to do this.

Hi,

YawPerSecond was a float variable that I made to store the number of degrees that I wanted the object to turn per second. Say, like 60. That ‘X’ node just multiplies two values. So, it’s multiplying the delta time (the time in seconds since the last tick) by the number of degrees that I want it to turn in a second. If the game is running at a steady 30fps, it will set the Yaw in that Make Rot to 2 degrees (.0333 seconds * 60 degrees/second); causing the object to rotate 2 degrees each frame.

Hope that clears things up!

Ok I got it to rotate (Thanks!), But It stopped rotating after around five minutes. How do I get it to go on forever?

Try using a RotatingMovement component in your blueprint. It’s designed to make something continually rotate:

That should easily do the trick.

1 Like

How do you then get it to stop rotating once it’s reached the desired rotation? I’ve tried setting a branch with every kind of “Get Rotation” I could find (all 3 separately on the bottom left there) and it just ignores the condition and keeps on rotating. -_-

Nevermind. Got it. The combination you need to do that is: GetWorldRotation for Static Mesh and Add Actor World Rotation instead of Local Rotation

easy as pie, should i use timeline for a bounce?

Hi man , this will rotate any actor in his place forever. You can adjust the float or pin in any other var.

Most Simple Solution

1 Like

Can i just state if your mesh isnt moving, try changing it from static to movable mobility in the Transform section of details.

.

For 2D Projects use this:

“RotationSpeed” is a float value. Negative values invert the rotation direction.

Result:

1 Like

There are so many assests on the marketplace that use tick. I swapped out the tick for the RotatingMovement component you listed for better performance.

Thanks JigglyToes

You can also use a Timeline, if you don’t want to use every tick, and use curves to set the speed of rotation.

1 Like