Smooth Rotation

Hi,

the interpolation doesn’t work, does anyone know why?

  • you may not be calling it often enough
  • you’re sampling actor rotation but only update one of its components - this could work if the cube was the root of the actor - is it?

still does not work. With a mouse click, it should rotate smooth 30 degrees

Interp needs to be sampled often, not once. For smooth rotation, sample it every frame - hence the need for frame delta.

Or, use a Timeline instead.

  • use rInterp if you do not care about the time it takes
  • use Timelines if duration is paramount

Different tools for different jobs. If in doubt, do tell what it’s for.

Many Thanks! I always have problems with the Timeline.

Rotation only works once. It should be, 30, 60, 90…360

Here each T tap would rotate it by 30 degrees over 1s providing you do not spam it and let the TL finish the job.

The details were not included in the original ask. Please describe it a lot of detail or explain what it’s for.

Rotation only works once. It should be, 30, 60, 90…360

The TL above kind of works like this but you need to prevent the interact spam by setting up a ready flag when it finishes playing. But again, not sure how it’s supposed to work - maybe I can spam the button 14 times and you still want 14x30 degrees rotation… Does it stagger over time, is it constant speed, do we care about timings, angles?

It can be done with interp or TL + lerp - really depends what we’re achieving here.

yes right, sorry. i want to rotate the cube with a laser beam in a certain direction, the rotating steps should always be 30 degrees

So what happens if I tap 5 times in 1 second? Do we rotate 5x30 or each click is current rotation + 30; which would be less than 150 deg? I am not being annoying - it can be set up in too many ways! :smiley:

you’re making this very complicated :grinning:

it may only be clicked once in 1 second

  • interp version

  • timeline:

There’s more ways to wire this up.

1 Like

Thanks for your support! :slightly_smiling_face:

1 Like