How to change/set vehicle position/rotation?

I’ve managed to achieve this in C++ with code like this:

void AMicroCarTemplate::Retransform(FVector NewLocation, FRotator NewRotation) {
  GetVehicleMovement()->StopMovementImmediately();
  GetMesh()->SetAllPhysicsPosition(NewLocation);
  GetMesh()->SetAllPhysicsRotation(NewRotation);
  GetMesh()->SetPhysicsAngularVelocity(FVector(0, 0, 0));
  GetMesh()->SetPhysicsLinearVelocity(FVector(0, 0, 0));
}

Note it was four years ago and I don’t know if there is now a better way or even if it will work on a modern version of the UE4.