Raised This Month: $ Target: $400
 0% 

Entity Moving Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 01-16-2005 , 08:21  
Reply With Quote #10

Ummm... Normalized vectors are vector with length = 1 ... So, to normalize a vector, you have to divide each compenent by the length of the vector.

If you want something to move from origin A to origin B, and want it to be done after y seconds, do what BlueRaja proposed. If you want it to go at a constant speed, no matter how far A and B are from each other, first normalize the vector ( the vector I refer to is the result of the subtraction ), and then multiply it by the speed.

You can find some vector functions in my "XS Library"; amxmodx/scripting/include/xs.inc
__________________
hello, i am pm
PM 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 19:17.


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