I’m trying to spawn a Niagara system on an actor I’m looking at. I get a reference to actor with a linetrace. With the blueprint i currently have i would assume it would attach at the root on the ground and then be placed 100 units above that But it only spawns on the root (Ground).
I Cant seem to access any other components on my looked at actor or else i would attach to them and not the Root component because I don’t have a set/solid reference, it can always change. Is there a way for me to pull that information from a changing actor reference?
Hit traces are based on your physics asset. When you hit you are actually hitting a bone, not the root. You would need to get the root and translate accordingly with BP/code. If you want an effect to spawn at the hit point facing the right direction, you’d spawn the effect at hit normal.
The BP you’re showing spawns an effect on q press, regardless of what it has hit.
You need to do a line trace on q press, you should also have a tag on the object/character its supposed to hit. If line trace hits a target with the right tag, it will then fire spawn event, and the line trace event will give you the normal location to spawn the effect.
If you’ve come from unity I can see what you’re trying to achieve. RAYCAST is what unity calls it. LINECAST is what unreal calls it.
So my Linetrace BP was in the same BP as a Q press logic. I have set up the linetrace on my Q press that traces for just enemys and when it hits it spawns on the ground still. The Blueprint picture i unpinned all the break hit result pins. Not sure what should go where but i tried a lot of different combinations and none worked.
So I found the solution. I had the spawn location set as a skeletal mesh location from my previous project I pulled it from. Just needed to add shape location in particle spawn.