Even in C++ I dont see a function to Get the target point from ParticleSystemComponent.
So I think that the TargetPoint and EndPoint are properties belonging to emitter instances. There is an array called ‘EmitterInstances’ in ParticleSystemComponent class. perhaps you should iterate through that array (or get the right EmitterInstance using EmitterIndex as array index). Once you get that try casting it to ‘ParticleBeam2EmitterInstance’. This one has a member array named ‘UserSetTargetArray’. You can then use the ‘TargetIndex’ to get the right item (whcich is a Vector) from that array.
NOTE: I did not try this myself using Blueprints. But it should work.
Sorry, I couldn’t get this to work. I don’t understand the EmitterInstance bit. It would throw an error if I cast to emitter, and would only let me cast to emitter class, but I couldn’t do anything with that.
When I create the beam source point (using Spawn Emitter at Location), the return type is a Particle System Component Reference, and it’s on this reference that I also create the beam’s end point (using Set Beam Target Point). Should it not be on this reference that I GET the target point’s location, rather than casting to another return type?
Sorry if I’m being thick. I’ve been stuck on this so long, I can no longer see the wood for the trees.
The SetBeamTargetPoint function in ParticleSystemComponent is actually a wrapper. It picks up an EmitterInstance from its EmitterInstance array and defers the call to it. There is a function with the same name SetBeamTargetPoint defined in the EmitterInstance class which actually does the job of adding the given point to UserSetTargetArray array.
But we dont have a function to get the targetpoints from ParticleSystemComponent.
So in C++, i would do
I will try this in an actual project today or tomorrow and also try and find a way to do this in Blueprint.
I have added 7 additional nodes to Particle System Component by editing the source code. If anyone is interested, they can get the code from my UE4 fork: https://github.com/alwintom/UnrealEngine