Directional Pickle w/ Angles
I'm trying to figure out a way to retrieve a special directional value from Object A's position, facing Object B. I retrieved the angle easily using the VAngle function.
I have two problems though...
1) The trick is, I'd like to convert this to 8 directional values, 0 to 7. However, using Floor(Angle/45) gives rather uneven results. Using Round (Angle/45) works better, but the problem is that for the last 22 degrees it rounds the value up to 8. Is it possible to somehow use an expression to make it jump back to 0 at this point, or will I need an extra event telling it to do so?
2) I'm trying to figure out how to make Object A turn to face Object B; turning in the direction that will reach the desired angle faster. I managed to achieve this using multiple events, but once again I'd like to sum this up with a single expression by somehow retrieving a positive or negative value (turn left / right). Can it be done?