I’v been scouring forums and post for about a week now, and after making some good progress I hit a brick wall.
I have an object that is moving at a set speed with a projectile weapon mounted to it. Recently, I have added a lineRenderer that will show me where a shot is likely to land based on the angle and velocity of my shots. (Which is determined by where I’m touching my screen).
Sounds all good right?
Here’s where the problem arises.
The line renderer shows accurately, but only if my object is not moving. The moment I add some motion to it, the line renderer stays in place until I re-touch the screen.
(Imagine if you were lobbing a grenade in Gears of war, but the projection lines origin point stayed in place instead of moving with your character.)
I’v been scratching my head for a while on how to make that line re-render per step, If it is possible, and if not what alternative should I be exploring?
Side notes:
The formula I’m currently using increments my starting position by the velocity and gravity each step. Ideally, I want it to re-do this method each step to keep a nice consistent prediction going.
Any help is appreciated, and I apologize if I missed something on here already, however I have been searching for a while :P. (Also, it’s almost 6 am, and my mental integrity has crumbled.)