Tuesday, May 8, 2018

java - Predicting Enemy Movement


Well I have a simple 2D game where all positions are defined by and X and Y coordinate.


There are objects moving at a constant velocity. And a turret fires a bullet at the X and Y coordinates of the object. By the time the bullet goes to the desired area, the object has already moved.


So i need to adjust the X and Y target positions for the turret to shoot at taking into account the bullet speed and object speed.


Here's an image showing the problem.


enter image description here




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...