0

I am trying to rotate the table that come with starter kit using this blue print:

enter image description here

I made sure the static mesh is movable so why it does not rotate ?

zac
  • 4,495
  • 15
  • 62
  • 127
  • Not being an unreal user myself, I will just add a comment: my guess is that the table actually has rotated 20º in the first timer tick, then it is constantly rotating to 20º NOT in increments of 20. My guess is that you have to increase the rotation on each tick, by adding some logic to the Z (Yaw) pin. As I said, just a guess. – LoPiTaL Dec 31 '16 at 16:32
  • @LoPiTaL Thanks, but I followed an example and I did the blue print exactly like in the example, I think the table variable some how does not point to the table static mesh although I dragged it from the components panel – zac Dec 31 '16 at 16:36
  • Is `Class Defaults` > `Actor Tick` > `Start with Tick Enabled` true? – Marson Mao Jan 03 '17 at 02:09
  • @LoPiTaL For the record, there are `set` and `add` nodes. The former behaves the way you describe while the one in use is indeed the correct one. I'd go with @MarsonMao's suggestion but please, once you hit play, can you verify the rotation is not being modified? Plus, you're adding 20 degrees with every tick. At 60fps that's 1200 degrees per second. – Fritz Jan 17 '17 at 18:41

1 Answers1

1

As few people mentioned in comments - you are adding 20° per frame. This is not good, since it will vary depending on your framerate. So you should make variable RotationPerSecond with desired value. Then multiply this value with Delta Seconds to get new rotation delta for current frame.

Make sure that this actor is Ticking (simply add PrintText node as 2nd Sequence node). If you doesn't see printed log, you need to investigate why Ticking is not enabled and correct it (usually new Actors will have Ticking enabled).

Next thing you should consider is using AddActorLocalRotation. By using your approach, your object will rotate around world origin (maybe this is desired behavior?). By using Local deltas, your Actor will rotate independently on WorldLocation.

Pavel Pája Halbich
  • 1,529
  • 2
  • 17
  • 22