Attach Actor To Component: Difference between revisions

From Unreal Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 24: Line 24:
If you want to Attach A Mesh to your component see Attach Component to Component,
If you want to Attach A Mesh to your component see Attach Component to Component,
note your blueprint or class will have to inherit from Actor to use Attach Actor To Component
note your blueprint or class will have to inherit from Actor to use Attach Actor To Component
==Notes==
This will attach the blueprint to the Actor, and every component in that blueprint, such as all static meshes will be<br>
attached. Everything you see in the viewport will be attached

Latest revision as of 01:07, 1 March 2025


Using the Node Attach Actor To Component you specify the parent which is a mesh, however the target is a Actor this can be a blueprint. Whats interesting is you don't need to specify the mesh of the blueprint, it seems to just know.

If you wanted a gun you would first Spawn in the blueprint, than set the blueprint as the target. You can connect to the blueprint to the correct socket and it will spawn the blueprint's mesh in the correct location.


This only works if you don't edit the meshes location or rotation in the viewport of the blueprint, when I did edit the meshes transform it no longer matched the preview mesh in the Skeletal mesh editor meaning it assumes that you are attaching at 0,0,0 and it will correct the offset depending on your socket.

You should also be aware that Attaching a component will automatically move it when the parent component moves so if the arm rises the gun or equipped piece will to



If you want to Attach A Mesh to your component see Attach Component to Component, note your blueprint or class will have to inherit from Actor to use Attach Actor To Component

Notes

This will attach the blueprint to the Actor, and every component in that blueprint, such as all static meshes will be
attached. Everything you see in the viewport will be attached