Lightning arc effect with moving source/target possible?

I tried to alter the lightning arc in the effects example with no luck. Is a beam type data module with moving source/target even possible?

Dear Christian,

Can you post what changes you made?

You’d have to turn the Beam Target into a Vector parameter,

and the update the target every tick to the desired location

here are several things to keep in mind, if modifying just the Target for example:

  • the target must be in world space, have to set it to this

  • the target vector parameter must have min and max of huge values, like -1000000 to 1000000 for x y and z

  • the target must be set to not being locked

the you give target parameter a name and set it every tick and you should be good to go :slight_smile:

I’ve not tested this yet but if this is not enough to get you rolling I will just let me know

#:heart:

Rama

I can’t get it to work, maybe you can give it a shot, would be awesome mate!

I will work on this and let you know!

:slight_smile:

Rama

#Download on Dropbox

oh I just realized I already am doing this,

I am updating a targeting beam every tick so that the end point hits terrain and stops,

so it involves tracing every tick and updating beam endpoint every tick :slight_smile:

I uploaded my exact asset that I am using to drop box for you to check out!

NathanLyer/ForChristian.rar

I migrated the contents, so it should be fully functional for you :slight_smile:

#C++

Here’s the c++ I am using:

//Set Beam End Location
JoyTargetBeam->SetVectorParameter(
	FName("Target"), 
	NewFVectorLoc
);

#:heart:

Rama

Do I have to do anything special to make it work, how can I specify the target mesh/actor? Thanks for your effort!

you should be able to just

  • spawn an instance of the ribbon in blueprints, make sure to set it to not automatically deleting itself upon completion

  • store a ref to this ribbon upon spawning, of type Particle System Component

  • use Vector Set Parameter of particles and set “Target” to the FVector location of your choice, with the Event Tick

So you might want to start by trying this in the Level Blueprint to make sure tick works :slight_smile:

:slight_smile:

particlesetparamvector.jpg

It works, thanks!!

Is there any way you could explain what you did to make this work in Blueprints? I’d love to make a beam arc from my first person camera, to an object in-scene, but I’m having no luck. I don’t see how it can be done at all.