Problem with scaling actor around point

Hello,

this function should scale an actor/it’s root component around a pivot point:

Called is it by the following:


This works well. After 1, 2, 3 iterations of the function above (I added the pivot point in world space as debug coordinate system (BEFORE calling ScaleAroundPoint)):


However, the actor is not rotated. If it’s rotated around 90 degrees on the x-axis, it looks like this after 1, 2, 3 iterations:

As you can see, the pivot point moves and it doesn’t scale around the same edge on each iterations.

What am I doing wrong? It’s basically the math you would do if you want to scale a vector.

Thank you,

Thilo

++++++++++++++++

Please. It drives me crazy that I don’t get this to work.

Okay, I think I got it (I hope). But I lost a whole bunch of hair about this. For anyone who is searching this:

Scales SceneComponent around PivotPoint given in local space. Returns the new pivot point (in local space) after applying local offset and scale:

Sets the scale of SceneComponent around a point given in local space:

I hope this holds.

Edit: Of course you can delete the DeltaLocation local variable in the first function and plug the line into the DeltaLocation pin directly.