🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
easiest way to find angle btween 2 points?
I would use trig, but if you plan on doing alot of this.....
then put your sin and cos in a lookup table as it is very expensive on your cpu
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
then put your sin and cos in a lookup table as it is very expensive on your cpu
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
There is no such thing as an angle between two points. Please flesh out your question a little more.
Later,
Eck
Later,
Eck
If you meant to say the angle between two vectors, then you can use the dot product to find that... but there''s no such thing as an angle between two points...
..-=ViKtOr=-..
..-=ViKtOr=-..
Okay, I asked the same question as VECTOR a while ago amd didn''t get an answer, so I know what he''s talking about. Let''s say point 2 rotates around point 1, then what is the ange that point 2 is at around point 1?
Morgan
Morgan
morgan what u described are 2 vectors
vector 1 is pt1->pt2
vector 2 is pt1-> (pt2 in a new place)
im no maths wizz but this is what i use
float top = pt1 DOTPRODUCT pt2
float bot = pt1.length() * pt2.length();
float answer = acos(top/bot)*RAD2DEG;
vector 1 is pt1->pt2
vector 2 is pt1-> (pt2 in a new place)
im no maths wizz but this is what i use
float top = pt1 DOTPRODUCT pt2
float bot = pt1.length() * pt2.length();
float answer = acos(top/bot)*RAD2DEG;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement