'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.
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:
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.
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.
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. -_-
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.