Hi, i’m trying to shoot a bullet that pass for specific point but tha continues in the same trayectory.
Its very easy shoot to player’s position, but i want the bullet continue the trayectory if player moves and bullet doesn’t impact with him.
I’m not good with maths, so maybe somebody can help me with an approach,
I’ve been thinking that maybe storing the diference between each X, Y difference between frames, and continue applying it until the bullet impacts with something, but im not sure that is the best way to do it.
That’s a reasonable place to start. Remember that the time between calls to Update can vary, so you want to multiply your differences by Time.deltaTime. I would suggest you write some code based on your idea and see what happens. A little trial and error can do a lot of good when you are working on a problem like this.
OMG, the “problem” was too easy to solve, it’s sounded difficult on my head because sometimes vectors are a little abstract to me.
Just multiplying the destination vector did de job: