hey!
I encountered a problem with Quaternion.LookRotation. Lets say my target is at a 180 degree angle, and i want to turn counterclockwise towards the target with quaternion slerp, but it turns clockwise. how do i “inverse” that?
hey!
I encountered a problem with Quaternion.LookRotation. Lets say my target is at a 180 degree angle, and i want to turn counterclockwise towards the target with quaternion slerp, but it turns clockwise. how do i “inverse” that?
poke
The direction of the turn is the smallest angle but when the angle is 180º this is completely arbitrary. You need to break the turn down into two smaller steps and activate them one after another.
This is a bit of a dirty hack, but you could also rotate by 179.99 degrees or 180.01 degrees to temporarily solve your problem.
ah. well i thought of that hack aswell with the 179 - 181 degrees, as the direction does not need to be perfect. but i could indeed make smaller steps of the turn.
thanks guys.