Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 903

How do you determine speed in a given direction?

$
0
0
I have a script and I would like to determine the speed of the ship in the forward direction of the ship only. Basically, if you where traveling 10m/s forward and you turned exactly 90 degrees I would get the speed of 0.
--- Automerge ---
After a little bit more digging I found some old code. I updated it and it works great.
Code:
		/*
		 * Returns the speed given a cockpit and a direction
		 * Example direction: Base6Directions.Direction.Forward
		 */...
How do you determine speed in a given direction?

Viewing all articles
Browse latest Browse all 903

Trending Articles