Hi! Ive asked before but Im thinking of doing a better question with more background now.
Im trying to do a classic laser reflection mechanic, where both particle effect and a linetrace is reflected, OR started a new from a normal impact point. If I have a prism I want the laser to reflect say 90 degrees from the hit normal point.
My problem is that I need this to happen recursively x times for every x prism (can be 1 can be 10, I want it to happen for each hit prism actor).
Im trying to do this, and I think Im on the right path, please check my blueprints:
This is my logic:
- I have a variable storing the current particle system component
- I have a line trace start scene component
- I have a set soruce point method that takes a a world location vector as input
- I have a linetrace method that takes a worl location and a forward vector as input.
- Im checking linetrace - hit results as usual, works fine. Im setting the target point at either the end trace position or at the hit location of any object.
- IF the hit actor == prism: I start a new linetrace, move the line trace start SCENE component to the new one and spawms a new laser particle, BOTH with normal impact as vector input.
- I change the variable current particle to the new one, I once again call methods: set source point and line trace for my new data.
What is the best way to do this? And also, what am i doing wrong in my code? Maths isnt my strongest side!
Thanks alot