Binding a node to the position of a static mesh component

Ladies and gentlemen, I need your help. I have a blueprint that customizes my toolbox. There are three variations. Large, small, and both. In the case where they are both, the small toolbox fits on the large one. But the problem is that the drawers of the small box stay in place as if it were on the floor.

Can you please tell me how I can link the transformation parameters of my drawers to the toolbox?

Important clarification: the logic of the drawers has been moved to a new script for convenience, so as not to create confusion in the main script.



All you need to do, is attach the draws to the toolbox ( hang them off it in the component list ). Then, when you move, the others move with it.

Thanks for your reply. That might work, but I am adding components via the add static mesh component node.

Yes, it’s a bit of a pain, but you can still attach them with a β€˜attach component to component’ node :slight_smile:

Tried that method too. But all drawer components are in a separate script. As far as I know, to make it work, component nodes should be used in one script :upside_down_face:

Different actor?

No. I created a helper script (screenshot 1). It has a set of drawers with its own settings so I can pull them out and stuff. I use this set in the main script (screenshot 2). It helps me not to get confused because there are so many drawer components.

I tried again using component to component node, it does work and the drawer follows the position of the toolbox. But then I create a lot of garbage in my blueprint. I’m more interested if there is a way to bind transformations additionally script to the added component. Like if I do it using the component to component node, only in my case I need to bind the script to the component.

I hope I have explained it clearly. Only now I realized how bad my English is =)
Π‘Π½ΠΈΠΌΠΎΠΊ экрана 2024-05-23 162239
Π‘Π½ΠΈΠΌΠΎΠΊ экрана 2024-05-23 162252


Π‘Π½ΠΈΠΌΠΎΠΊ экрана 2024-05-23 162335

Why not pass a reference to the main box into the function β€˜small drawers set’? Then you can do the attachment in the function, and keep things neat.

You’re my hero. I don’t know why I didn’t think of that. But it really is a working solution to my problem!

Thank you! =)

1 Like

:smiley: :+1: