Raised This Month: $ Target: $400
 0% 

Solved [ H3LP ] Velocity between two points?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-23-2017 , 20:55   Re: [ H3LP ] Velocity between two points?
Reply With Quote #4

The direction vector between the two players is simply the subtraction of the two positions and dividing by the linear distance. When you do the subtraction, make sure the the order is done correctly:

<direction vector> = (<target position> - <from position>)/distance

This is called a unit vector (a vector with a length of 1). Then, to turn it into a velocity vector, you simply multiply by the speed.
__________________

Last edited by fysiks; 07-23-2017 at 20:57.
fysiks is online now
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode