Blueprint: Get Component Relative Location Always Returns (0,0,0)

In my construction script I have a component that I wish to get the relative location of to drive some other construction behavior. The issue is that no matter where I move this child component in the editor, when I query the relative location (via “get relative transform” or “Get Relative Location” the value that is returned is (0,0,0).




This only changes if I change the initial location in the Blueprint “Viewport” tab, at which point it always returns the new initial relative location, but ignores any changes that I make in the editor to the placed instance. Does anyone know why this would be? Getting the world location of the component exhibits the same problem, with it just returning the parent actor’s location, no matter how I move the component.

I am tearing my hair out on this, I feel there is something basic that I must be missing. Thanks!

Answering your question live: Twitch

Actually, found out that it is a bug and in the works to getting fixed: Unreal Engine Issues and Bug Tracker (UE-21838)

Thanks Victor, so looks like it has been a bug for about a year now? Shocked that something like this (basic functionality) has gone unaddressed since 4.9?! How is that possible?

Thanks for taking a look, sorry the question was confusing at first. The use case, since you were wondering, is to be able to use the component as a marker for the automated placement of instanced meshes along a vector (rather than having to do it numerically)

Any progress on this? This is really kind of screwing me over right now.

Is there any workaround?

I have the same problem but i can solve it just like this:

  • Break hit result (if you have one)
  • Get the hit location