Jump to content

PHP vectors


zed_katarn

Recommended Posts

Hi all,

I'm trying to make a simple game using php, and i want to calculate the x and y speeds of an object traveling from its current position to a point (x,y).

For example:

A ship with a speed of 400m/s travelling to a point 20x and -400y from its current location would need (x) m/s on the x direction, and (y) m/s on the y direction.

I'm not a physicist and most of the help i have found on the internet involves other languages.

Any help would be great.

Thanks,
K
Link to comment
https://forums.phpfreaks.com/topic/30638-php-vectors/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.