Beam Source Point For Laser?

I have created a laser using particle effect and “SET BEAM SOURCE POINT” & “SET BEAM TARGET POINT”

I have 2 issues I need help with:

  1. Source of laser is centered on Player, so both ends of laser stretch across Player. (not firing from arm and outward)
  2. Cannot have Laser Particle Attached to Player (Could’t attach particle to socket)

Note: This is in SideScroller

Im Summary:

  1. How do I make a laser beam shoot from Players arm outward
  2. How do I make this laser(particle) attach to the Player

Any insight would be appreciated and most likely offer karma from game dev gods and +1 thumbs up in UE4

Thanks!!!

Create an invisible static mesh and attach that to the player’s arm. Then emit the laser from that mesh.

The invisible static mesh, or any non-static component parented to a joint on the skeleton, stored as a variable should work. Also, you can just use the joints on your skeleton. A socket should work for you, not sure why it wouldn’t, this is the best way to do it IMO as you can define the fwd axis very easy with a socket, and use a socketName in a blueprint as your spawnEmitterAttached location.

How I would attach a mesh to a vector?

Could you explain “Emit the Laser From That Mesh”.
I understand what you mean, but from [Spawn Emitter] node… Location is vector. And not sure how I would attach a mesh to a vector?

Thanks

I believe my Particle [P_electricity_arc] from Content examples may be the issue. It appears the particle effect, source is right in the middle of the laser beam. I am not sure how to stretch this laser beam outward to a mouse point.

Would you know a way to do this?

I am trying to do this off the top of my head without a sample game running local, but I believe this setup should get you going…

You will need some variables for your Beam Source, and Beam Target…Depending on your game I would handle it something like this. I included cast to character and cast to skeletal mesh to show you how you can get the socket location by casting…I don’t know your specific case so you’ll have to experiment.

If you do a trace to a position in space, you can store that as a vector variable and make that your BeamEndPoint as well…

Thanks a Bunch!!!