How do I create predictive aiming by setting the x positon of a node?

  Kiến thức lập trình

I’m creating a game with a type of projectile that will intercept the player if you keep moving in a direction. The way I have all of my projectiles set up makes it imperative that I do this by setting the x position of the projectile and not having it aim at a predicted target.

I have access to all of the basic data from both nodes I need to make this work (position, speed, velocity, etc), I just cannot figure out a consistent equation which will give me the needed x position to place the projectile at before it comes on screen.

The only part of this which is constant is the starting height of the projectile, which is -660.

LEAVE A COMMENT