For a bow and arrow game, should I use angle or direction for the bow?
Anyway, is there any difference between angle and direction in two dimensional space?
Thank you in advance.
For a bow and arrow game, should I use angle or direction for the bow?
Anyway, is there any difference between angle and direction in two dimensional space?
Thank you in advance.
You mean angle versus Vector?
like … fire at 34 degrees with a power of 52, versus … a vector of 0.6,0.9 or something?
It sort of depends what you wan to do after that. If you use an angle then you have to at some point convert it to a position, which means you have to do a Cos(angle) and Sin(Angle) which are expensive operations. If you keep them in vectors, you are basically just adding two numbers together. Depends how many times you will be calling it as to whether it’s worth that optimization or what’s easier for you. If the object needs to maintain an angle and maybe change angle over time or something you might be better off with an angle instead of a vector.