When calling "SetActorTransform()" (or eg setactorlocation()) in editor, location is updated correctly but the visual representation of the object is not. How do i update the visual representation?

So I’m trying to set the transform of an object in the editor with “SetActorTransform()”.

In 4.10 this worked as expected, I change the transform and the object visibly moves.

Now that we are in 4.11 when I set the transform the configuration all changes correctly, numbers at the side showing rotation scale and location are all correct (and have changed). In addition the little 3 coloured arrow thing (or scale lines or rotation markers) changes its location correctly. However the visual representation of the object in the editor does not move.

If I move the object further, by dragging it to the side using the three arrows thing, it immediately snaps to the correct (transformed) location and then moves on as normal (having been transformed).

So for example if I called simply just “SetActorLocation(oldlocation + (oldlocation.x + 100))” on a cube, the three arrow thing moves 100 units to the side, but the cube itself does not move visibly until I manually move it again in the editor, when it snaps 100 units to the side as it should have done previously.

I have tried calling “Actor->SetIsTemporarilyHiddenInEditor(false);” and “Actor->PostEditMove(false);” but this doesn’t do anything.

I’m sure there must be some function to refresh the location of the object, I just cant find it.

Any help please?

Try Actor->MarkComponentsRenderStateDirty(). I think this should tell the editor that you changed something, so it will update the actor’s visual representation.

Thanks for the response, i have tried this, got nothing.

Any other ideas?

What about Actor->Modify() after setting transform?