I have done a mechanism to throw a weapon at the line trace hit location. So the issue I’m facing is that the weapon doesn’t stop at the trace hit location. It stops a bit ahead. The mesh doesn’t even respond to OnComponentHit. In fact the collision doesn’t even work. I have set the static mesh to “Use simple as complex” and “Block all”. Can someone please help me solve this?
You are overriding collision by setting world location, essentially forcing geometry intersection. Some options:
• use overlap and stop the TL when the throwable begins the overlap
• or tick the Sweep checkbox on the set world location node, then stop the TL when sweeping returns a hit
Also note, anything in the TL’s Update fires every frame, you are detaching 60 times per second. It has no effect on the result here, but it’s a bunch of unnecessary calls. Detach before the TL starts.
In order to use onComponentHit, you’d need to use physics. Or something that emulates it, like the projectile movement component.
I’m sorry these aren’t working. I’m still facing the same issues. Is there any other ways to accomplish this? (Version used UE 5.2.1)
Thank you
What is not working, precisely? Could you show the script taking advantage of one of the above methods not working as intended?
The above solution worked now. The issue was with the static mesh. I changed it and used sweep hit and stopped the TL as you said. It’s working well.
Thanks a lot.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.





