i need a static mesh by line trace.But the hit result is actor or component,it cant be used in set static mesh.how can i get the static mesh object?
Hello,
The correct code would look like
.
As you can see, we are using a cast on the Hit Component, in order to get a static mesh component( a static mesh actor has an SM component inside), and then we just set the static mesh using a mesh from the drop-down menu or variable.
Enjoy
Maybe you misunderstood my idea,i want the hit result to be the new mesh, but i cant cast the component or actor to static mesh object