Skip to main content
11 events
when toggle format what by license comment
Feb 7, 2015 at 2:28 vote accept fryBender
Feb 6, 2015 at 19:30 comment added fryBender I cannot thank you enough. I'm still trying to reach that fabled 15 reps so I can upvote you but I hope you know how much I appreciate this. Also, I wanted to add I was able to fix this part var angle = Mathf.Atan2(heading2d.y, heading2d.x) * -Mathf.Rad2Deg + 90; by changing it to var angle = Mathf.Atan2(heading2d.x, heading2d.y) * Mathf.Rad2Deg ; and the character is looking directly at the current target.
Feb 6, 2015 at 18:45 comment added jzx Okay, I think I'm happy with this now, haha.
Feb 6, 2015 at 18:43 history edited jzx CC BY-SA 3.0
deleted 574 characters in body
Feb 6, 2015 at 18:37 history edited jzx CC BY-SA 3.0
deleted 574 characters in body
Feb 6, 2015 at 18:31 history edited jzx CC BY-SA 3.0
deleted 574 characters in body
Feb 6, 2015 at 18:14 history edited jzx CC BY-SA 3.0
deleted 574 characters in body
Feb 6, 2015 at 18:11 comment added jzx Did some testing myself to check. Looks like you were sortof on the right track, but there's a gotcha in Unity's degree/radian conversion.
Feb 6, 2015 at 18:09 history edited jzx CC BY-SA 3.0
deleted 574 characters in body
Feb 6, 2015 at 17:23 comment added fryBender When you say "Now you can use the normal 2D "angle between vectors", do you mean the arc tangent between two points, in this case new heading.z and newheading.x?
Feb 6, 2015 at 16:24 history answered jzx CC BY-SA 3.0