Download

rifle blueprint and failing in fire direction

**i am working on a project , i tried to add the rifle weapon from the shooter content example to my custom’s character’s .
but as shown in the pictures , i have failed to handle it correctly :


// understanding the issue :

7f6a6108a2184ac4742f6acbaf52136f1d45ccf7.jpeg


64c13dec017f4cc76b78278e50c6ed1232af272c.jpeg


// the rifle blue print :


// the character event graph and function graph :

f234583c093c6d862857f8e3e7307bfbe521b8f1.png
0c574267ac595e9afd6f1408f045377856ffc300.png

how i should do it ? **

I am going to assume the issue is about the line trace. You have a get forward vector node but aren’t getting the cameras forward vector

bb641c2bb0f3c47b10d68e978f81fdbd84e2fa07.png

thanks for this quickness , i have updated the bl but it looks it spawns the tracelines or fires back left of the character .
399279e4b1c91a3d4fdf5eb2b39a522a11dc5723.jpeg


//the result :

e3f7d509cd361ae6ed3d7d6ba8b36af1e128c9bd.jpeg

You forgot to connect the Camera Manager to the Get Actor Forward vector. Ill also point out that 1000 units is only 10 meters, you will want a lot more than that for a rifle

You should probably get the forward vector from the socket or the gun rotation…

thank you , so much DEDRICK and TK-Master .

Depends on whether you want it to fire when your crosshair is(Camera manager) or where the gun is physically pointing (Socket). In First person camera and gun rotation are the same once you have aim offsets, third person things can change a bit or can be exactly the same as first person

how do i add a shoot cursor for it ? will be happy to help me on this .

Take a look at the first person template, it has a crosshair you can tear apart and see how they add it to the viewport

Shoot cursor as in crosshair? I think the most simple way would be to add a simple UMG widget (with a crosshair image anchored at the center of the screen).

thank you very much , i dont know how do i thank you .

Afsoft, may I ask where you got your 3D models?

^Yes , i am gathering my characters from “Mixamo Fuse” software , a auto design character , and its free .