I think @yn97 your math understanding is lacking. You should read up on vectors, here is a good link to understanding what a dot product actually can do.
1 Like
The dot product also gives you a magnitude. I would never just turn at a constant rate left/right. Scale it by the âleftâ float in my example⌠else you will constantly be bypassing and turning back to your target.
If you really want an angle from it then you can use atan2(left, front) which will give you +/- 180 degrees (in radians). (And then donât do the âif behind, max it outâ check in my example.)
âŚbut generally I think developers use angles only because they understand them. But itâs almost always a waste when they are just going to get converted back to something else anyway.
1 Like