Hot answers tagged

1

The convention I've observed in most modern games is neither option you've proposed. Instead, W or "Forward" on the stick usually corresponds to "Upward" on the screen from the current viewpoint, what we call "camera-relative" controls. This way, the player does not need to attend to which compass direction they're currently ...


1

For anyone who might be facing a similar issue, I found the solution. As you may know we are suppose to disregard any axis which are (0,0,0) (cross product of edges from two shapes is 0), because we cannot project onto a vector of zero, as well we will not be able to get a minimum translation vector or minimum overlap. In my code, in the loop which goes over ...


1

Assuming your axes are set up like Unity's... forward.x = cos(pitch) * sin(yaw); forward.y = -sin(pitch); forward.z = cos(pitch) * cos(yaw); Since pitching acts around the right axis, you can neglect pitch for that case. Then it's basically the same as the forward axis, shifted by 90 degrees of yaw (turning sine into cosine and cosine into negative sine) ...


Only top voted, non community-wiki answers of a minimum length are eligible