Original Post
🔒 Locked
Direction vector normalizing?
Advertisement
You can do both, but I usally have both a velocity vector and a (normalized) direction vector. It´s really up to you.
[edited by - Roquqkie on July 19, 2002 5:41:43 AM]
[edited by - Roquqkie on July 19, 2002 5:41:43 AM]
It''s just a collection of numbers, really. What you do with it is up to you. The main thing is that you give it a meaningful name - don''t call it ''direction'' if it contains both direction and speed. Call it ''motion'' or ''velocity'' or something instead.
[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]
[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]
you see it depends on what your after. if you need only the direction and speed has no effect, then normalize it. if you need both (maybe to figure out forces that will act upon something) then dont normalize it.
like said before and will probably be siad by all who reply. it all depends on what you need.
like said before and will probably be siad by all who reply. it all depends on what you need.
a normalized direction only needs 2 values..
"take a look around" - limp bizkit
www.google.com
"take a look around" - limp bizkit
www.google.com
quote:
Original post by davepermen
a normalized direction only needs 2 values..
How so? in 2D yes, but a non-normalized vector needs as many.
In 3D you need 3 values as well. Just because x^2+y^2+z^2=1 you cannot store only x and y. Besides having huge computational expenses to recreate the 3rd you loose it''s sign.
If you''re referering to angles it works, but is impracticable as hell for general purposes
---------------------------
I may be getting older, but I refuse to grow up
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement