• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] HELP!
#3
What you want is the concept of a?Unit Vector.?Simplified version: vectors have both direction (where?), and a magnitude (how large?). A unit vector is defined to connect two arbitrary points in space with a magnitude of length 1 -> it effectively gives us the "direction" of the destination point with respect to the origin.



You also have the option of then "scaling" the vector - somewhat along the lines of what Y_Less was saying. However, if you're interested in only getting the direction, use the unit vector. The reason behind this is that most of the vector algebra you can do (cross product, dot product, etc). will use the magnitude, and since it is literally 1 you're making the computations easier for the server to handle.
  Reply


Messages In This Thread
HELP! - by mouiz - 2019-05-25, 08:14 PM
RE: HELP! - by Y_Less - 2019-05-25, 11:24 PM
RE: HELP! - by maslag - 2019-05-25, 11:55 PM
RE: HELP! - by Stanislav - 2019-05-26, 12:27 AM
RE: HELP! - by mouiz - 2019-05-26, 12:35 PM

Forum Jump: