Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Fire projectile in front of target rather than at target

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 plusplos   Members   

104
Like
0Likes
Like

Posted 08 July 2014 - 02:38 AM

Hi guys,

 

I'm having a slight issue in calculating the speed and vector of a projectile to ensure it will always hit a moving target.

 

Assuming all speeds are constant, with only and x and y axis, and are moving in meters per second:

 

If I fire a projectile at my enemy, at a speed of 10m/s, that is 20 meters away and the enemy is moving in a straight line at 10m/s.... how can I find the projectile's moving vector to ensure that the projectile and the enemy meet at the same point?

 

I hope it makes sense, let me know if anyone needs anymore explanation.

 

Thanks for any help!



#2 Kryzon   Prime Members   

4593
Like
2Likes
Like

Posted 08 July 2014 - 03:49 AM

Hello.

Try this: http://www.gamedev.net/topic/650172-direction-of-a-bullet/



#3 plusplos   Members   

104
Like
0Likes
Like

Posted 09 July 2014 - 01:14 AM

Oh great, thanks a lot! That's exactly what I needed.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.