Saturday, February 22, 2014

Simple solution to Electrical Arc

Because I was determined to set the BeamEndPoint of the particle to the player location, I missed the obvious solution of reversing the end points. Since the source is the emitter, I simply set the emitter location to whatever instigates a Touch on the trigger. I tried using an Attach to Actor node but that didn't work on players or vehicles so instead I had to use Set Location.

This solution requires no external programming to make work. Thanks to Marty, I now know about changing the target type to Actor and so this is much easier to use than before where the end point vector coordinates had to be manually set for each copy.

Set Actor Location doesn't seem to like taking vector variables in for rotation so I have typed 90 pitch in that node to get the arc to face up. The activate delay on Turn On is to prevent the beam from being briefly visible when it's triggered from a new location.
Just found out you can plug an object directly into the Location input for Set Actor Location. This eliminates the need for a Get Location.