Hi all, this is driving me nuts so just wondering if I can get a second pair of eyes on it to tell me where I am going wrong!
Here's a capx
What I'm trying to do:
When spacebar is pressed the emitter sprite generates a projectile.
This projectile has 4 line of sight behaviours attached to it - I want each of these to pick a random point on the screen at specific intervals.
When they intersect with a solid they generate a sprite at the intersection point. In addition to this, to represent each line of sight path, 20 dot sprites are generated and these should be spaced evenly between the projectile and the intersection point and continue to adjust position accordingly until a different intersection point is chosen.I'm trying to do this by lerping between the projectile position and the intersection point.
To keep track of which dots are linked to which line of sight behaviour they are given a variable on creation which is set to 0, 1, 2 or 3 and are picked accordingly.
The problem is - none of this is working!
I'm not sure where I am going wrong - possibly the way I am using the viewport to pick positions? The way I am picking things? The way I am using Line of Sight?
Any help or insights is greatly appreciated! :)