Rotate around pivot animation

Hello community,

I’m trying to create an animation to rotate an object around a specific object, I was heavily inspired by the script I found in the docs

as i was able to rotate around a specific point, the animation was not smooth, since it’s a rotationQuaternion and a position animation at same time.

is there anyway I can modify my script so I can create a smoother animation ? (as if the object pivot was the given point)

here’s my playground, would appreciate the help

What do you mean by ‘not smooth’? I’ve ran the PG multiple time sand everything seems smooth to me. let me know what I’m missing here :slight_smile:

oh sorry for the confusion,
imagine if the box pivot was actually the red sphere, if we were to rotate it on it forward vector it would perform a pendulum swing animation,

maybe one of the solution is to compute the new position/rotation and set keyframes values at “each frame”, but I think that’s could an overkill for a simple animation. :sweat_smile:

I think I understand: you want the movement to decelerate/accelerate back around the apex?
Did you try this?

not really,
I want to achieve this animation, without having to set a new pivot point to the box

here’s a playground where the sphere is the box pivot

You need more keys in your animation or tweak curve tangent with ACE.
Or go procedural :slight_smile:

3 Likes