Line Trace by Channel

Hi everyone

First sorry for my english

I use The character blueprint from first person exemple

I would like to attache a projectile like a arrow to a wall static meshe I think “Single line trace by channel”

When i tried to trace a line from “first person camera” to an object for exemple the line start not from camera but from
Can anyone help me ?

I have look the blueprint tutorial here - YouTube but not OK for me

Can you post your blueprints?


I have tried with 2 box an i have no problem. When i try with attach to camera y have touble

I’m not sure if this is your problem, but I don’t think adding 5000 to your forward vector does what you think. Adding a float to a vector will add that number to each componenet of the vector. So for instance if your forward vector is (1,0,0), adding 5000 will result in (5001, 5000, 5000). What you probably want is to multiply it by 5000 (after possibly normalizing it)

Cool for help that was the problem

Can you put me on the right direction i would like to :
1.throw a arrow this is OK
2.arrow hit something i think take the break hit result
3.I would like to attache the arrow to a wall or to any actor
I have tried attache actor to actor but …

So spawning and shooting an arrow is no problem? To attach the arrow to a wall, I would try something like this:

You use the Hit Event to be notified about a collision of the arrow. Use the hit result to find the thing that was hit (to apply damage etc.). Disable physics for the arrow. This should make it stay where it is. Of course this is just the beginning and you can tweak this to get a better behavior. Some ideas:

If you want to attach the arrow to moving things, such as an enemy, take the component from the hit result and attach your arrow to it.

You could calculate the angle at which the arrow hit the wall and only make it stick to it, if the angle was high enough (maybe > 20). Otherwise, don’t do anything, as it just barely touched the wall.

You could also take the impact or the speed of the arrow into account to decide whether the arrow should stick or not.