I am trying to roll a cube in Unreal but I am not able to do it. For visualization purpose I am creating something similar to this : https://www.youtube.com/watch?v=3nFpUDAzysY
For this I attached a URotatingMovementComponent and tried to offset the pivot in order to rotate it.
I have attached the code that does it. But it does not work.
What this code is doing is taking the world space location - the actor’s location plus the offset you want for the pivot - and using InverseTransformLocation to convert it into the cube’s local space that the URotatingMovementComponent is expecting.