Reading the documentation about these functions I have found something that I don’t understand.
In the SetActorLocation, the explanation for NewLocation is: The new location to move the Actor to. And, in SetWorldLocation is: New location in world space for the component.
For the SetActorRotation, the explanation for NewRotation is: The new rotation for the Actor. And, in SetWorldRotation is: New rotation in world space for the component.
I don’t understand “world space”. I suppose than in both cases the actor is inside the world and the location and rotation is inside the world space.
Which are the differences between SetActor… and SetWorld…?
I have tried the same code changing SetActorRotation with SetWorldRotation and I can’t see any difference.
I’ve been learning UE4 for a year now and this one had me confused for some time as well. But it is as simple as @Ares9323 said. To give an example, on the default Third/FirstPersonCharacter, add a component (such as Arrow etc).
You cannot call GetActorLocation on the component. You will have to get its location in world space. The reason is simply because it is not an actor. If you try to call GetWorldLocation on an Actor for example, it will make you select a component of it, such as the Mesh.
Of course there is a lot of technical logic going behind this but this is as simple as someone can tell you!