Raised This Month: $ Target: $400
 0% 

[Maths] Given 2 points, retrieve a point between them


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
nosoop
Veteran Member
Join Date: Aug 2014
Old 07-14-2022 , 21:13   Re: [Maths] Given 2 points, retrieve a point between them
Reply With Quote #5

If you have the two points A and B and need a distance L along the line from the start, you'd want to create a vector from B - A, then normalize and scale by L.

If you have one point A and an angle, get the forward unit vector from the angle (in SourceMod you'd use GetAngleVectors), then scale that by L.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
 



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 21:02.


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