Widgets For FVector Properties UE5
We are going to make a widget so our cube will move in a diagnol location and make it easy for the designer to do this as well.
In the header we want to set a Target Location and be able to access that information from the editor.
NOTE: The location is relative to the cube and not the world.
Over in the cpp file
We will have to get the global target location with means we will have to get the normalized position of the target location and transform it. Then we will need to get the direction of the cube. Multiply those factors together and we will have a cube moving from it’s start position to the target location at the speed set.
Next Steps: Sending the cube back