Smooth Transform Interpolation both ways?

Hi all,

I have an interactable object in my game where I want the icon (Brown box) to always be looking at the main character (Z-Axis only), and then when the mouse hovers directly over the object using a linetrace the brown box will Scale up and also look at the main character on the other 2 rotation Axis.

I’ve managed to get this to work almost to how I would like.. but the problem is that whenever I move my mouse back away from my object the transform interpolation is not smooth, it just snaps the brown cube back to previous rather than gently transitioning like it does on the initial hover over.
(The scale of the brown cube also doesn’t seem to reset back to it’s initial value before the boolean)

Does anyone know how I could get this to interpolate/transtion both ways?
Any help would be greatly appreciated!

Here’s a demo of how it’s currently looking:

And here’s the Blueprint:

The Select node must be connected to the Target Rotation pin of the interpolation node.

1 Like

Thanks so much for that! it works perfect now - Although I’m runnning into a small issue now of I want the box to rotate a further 90’ when actually clicked on.

I’ve managed to set it up ok but it just seems like it’s not rotating on the same axis as the orignal look at vector? Is there something I need to add here:

Try replacing Set Relative Transform with World. :thinking:

1 Like

Unfortunately I already tried that with no success sadly! It gave pretty much the exact same results… is there potentially a way to construct the new axis and then rotate it from that?

I’ve been messing around with the “Rotator from Axis and Angle” node but I’m not entirely sure the best way to set it up..

Thanks again for your help

I’ve also tried adding in an additinal Tinterp node just to see if I could rotate the cube separately before the LookAt takes place. But it ends up glitching out like below:

To make the cube look at the character “sideways”, you just need to replace the rotation along X.

Either we don’t understand how it works correctly, or it doesn’t work correctly… :melting_face:

1 Like

Thanks I feel like it’s nearly there! Unfortunately now it just won’t smoothly interpolate to the new rotation again… it does it on the reverse for some reason just not on the intial fade in from the click action.

I feel like it might have something to do with the delta time? I’m having to put in weird valuse to get it to work how I want: