Set Transform Variable's Widget to show in-editor in World-Space, not Relative-Space?

The problem I’m having is that the widget (NOT the object I’m applying the transform to in my construction script) seems to only be movable RELATIVE to the blueprint itself. I’m hoping to have the widget show in worldspace instead.

Current Behavior: Widget In-Editor World Transform = Blueprint World Transform, because all location/rotation values are 0, and the scalar values are 1.

  • Blueprint World Transform: [200,500,30] [20,-60,30] [2,2,2]
  • Widget Value: [0,0,0] [0,0,0] [1,1,1]
  • Widget In-Editor World Transform: [200,500,30] [20,-60,30] [2,2,2]

Intended Behavior: Widget In-Editor is as world location 0,0,0, rotation 0,0,0, scale 1.

  • Blueprint World Transform: [200,500,30] [20,-60,30] [2,2,2]
  • Widget Value: [0,0,0] [0,0,0] [1,1,1]
  • Widget In-Editor World Transform: [0,0,0] [0,0,0] [1,1,1]

Is this possible?

You can keep the widget at the origin with

Thanks for replying.

How do I reference the widget? It looks like in your screenshot you’ve just referenced a vector named “Widget”.

To clarify, the below screenshot is the widget I’m referring to. It’s the “Show 3D Widget” of my variable, not the variable itself.

And to further clarify (although I think you already understand this), I know that editing the default values will move the widget around. But by default it moves it relative to the BP origin, but I want it relative to the World origin.

1 Like

My vector is a variable, just like your transform.

That formula I gave, translates between local and world.

Incidentally, why not just move the actual widget around using the mouse?

I am moving it around with the mouse. My problem is that the 3D Widget is relative to the BP. So, if I move my BP 1000 units in the X direction, the widget will also move 1000 units in the X direction.

The intended behavior I’m looking for is when I move the BP, the widget stays where it was in world space.

1 Like

Ok, mine does that. Have you tried that construction script?

Sorry, yes I’ve tried it, but it only solves half of the problem; It locks the widget in world-space at the origin, but it disables my ability to manipulate the widget with my mouse.

I would still love to be able to manually edit the location/rotation/scale of my widget in the editor using the mouse, but make it so that when I move the BP, the widget doesn’t move in world space.

1 Like

MUCH better solution

You can click the bool if you want the widget to follow, otherwise it won’t :smiley:

widget

Thank you so much for working on this! I think that this is getting very close to a complete solution, but I believe it’s still incomplete. I’m also running into some difficulties because I’m trying to implement your solution with Transforms instead of Vectors, which use different functions.

Your GIF shows the behavior working as requested when the BP is moving, but you don’t showcase the behavior when the widget is moved. I think that’s still a missing piece.

If I understand correctly, your “Widget” variable is intended to be Relative-Space, and your “Widget Saved” is intended to be World-Space. The problem I think I’m running into is that regardless of if “Follow” is enabled or disabled, BOTH the relative and world variable must change when the widget is moved.

e.g. regardless if “Follow” is enabled, if I move the widget Y+30, then both “Widget” and “Widget Saved” need Y+30.

Following = True:

  • Relative Variable:
    • Does not change when BP is moved
    • Changes when the widget is moved
  • World Variable:
    • Changes when BP is moved
    • Changes when the widget is moved

Following = False:

  • Relative Variable:
    • Changes when the BP is moved
    • Changes when the widget is moved
  • World Variable:
    • Does not change when the BP is moved
    • Changes when the widget is moved

@ClockworkOcean

I correctly transposed your logic for transforms. It looks like we’re 90% of the way there (and I’m starting to doubt it’s possible to get 100% of the way there).

I’ve changed “Follow” to “Engagement Locked”, and swapped the outputs of the branch.

The widget is movable while “Engagement Locked” is disabled, however it cannot be moved at all when it is enabled. It seems locking the world location also locks the widget. Not sure if there’s a way around that.

1 Like

It works fine for me :slight_smile:

Do you actually need transform? Will you be messing with rotation also? It’s probably just easier to do the location and rotation separately, as there are world/local translations for that.

I don’t really see how using transforms the way you are there is helping, because you aren’t translating between local and world space :thinking:

PS: I just checked, you can’t rotate the widget, so it’s location only I’m afraid.

Edit; marking this as a solution (despite only getting me ~90% of the way there, although it’s a very good workaround that I can live with). Thanks for your work/guidance, @ClockworkOcean.

My revised blueprint is below is a function that goes in the construction script. Ultimately I have 2 transforms (only one with a widget), and then a boolean that locks/unlocks worldspace. While worldspace is locked, the widget cannot move (but, that also means it won’t move in worldspace when I move the BP, which is what I was hoping to accomplish).


To clarify, for your blueprint, is the widget movable while “Follow” is false? When I implemented your solution (and after transposing it to my transforms), while Follow = False the widget would not move.

My observation was that the construction script would force “Location” to be overwritten with “Location Saved”, which meant that the widget wouldn’t move because it was being reset to its saved location whenever you tried to move it.

Also, my function seems to be translating my transforms between Local and World space. I’ve renamed the variables for clarity.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.