Hello people. I might be asking a stupid question right now, but I only started making my first game this year and I’m working on a Paper2D project.
I’m spawning a projectile from the sky (from an arrow component) in an angle, that moves (with projectile movement) to the ground after a short time, and I’m trying to make an indicator (maybe something like a light particle on the ground) where the projectile should hit, based on how far the arrow has traveled in the X axis over a short Timer duration.
I tried doing a Line Trace for objects to hit WorldStatic, to trace for the tiles, but the Line Trace from the arrow wont trace in the same angle that the projectile is spawning in. I was wondering if it’s an easy way to do this, because my first idea was line tracing directly from the arrow to WorldStatic objects and spawn an emitter at the end location of the trace.
Any feedback is much appreciated! I’m trying to learn as much as possible since I’m pretty new to this
Hey, thanks for the reply. But I think I figured it out, by using the forward vector of the trace point.
But now I’m wondering how I can make a spawned actor/emitter (the indicator of the hit point) follow the traced location in real time over the timer duration? Because if I spawn an actor at the trace point, it will just spawn once at the initial location won’t it? Sorry for no screenshot, but I don’t have my computer here right now, so I’m posting from my phone
Line trace is almost always the simplest and the best solution(in my opinion), drop a screenshot of what you trying to do and we try to fix it for you.
This one is quite simple actually just spawn it at Event Begin of the projectile save it to a variable and set its actor location as the hit location for every hit in your timeline(don’t use ticks because its an overkill).
Hello again and thanks for the answer! I didn’t do exactly this, but something similar, because while I’m holding down the button, the indicator starts moving forward for 2 seconds, and when I release, I summon the projectile to hit at the traced location for however long i held the button. So now I’m spawning the actor(hit point indication) repeatedly and destroying it after 0.02 seconds unless the timeline has finished, so now the indicator seems to be moving perfectly along the ground where the projectile should hit, and it doesn’t destroy itself if I reach the end/max distance of the trace.