我正在尝试使用这些变量计算相机向上 vector :
private Vector3f targetPosition = new Vector3f(0, 0, 0);
private Vector3f camPosition = new Vector3f(0, 0, 0);
private float pitch = 20; // y rotation \\
private float yaw = 0; // x rotation \\
我怎样才能实现这个目标?
最佳答案
世界空间中的向上 vector 就是向上或者任何你想定义为“向上”的东西。通常 up 只是正 y:
private const Vector3f UP = new Vector3f(0.0f, 1.0f, 0.0f);
关于java - 如何计算世界空间中的相机向上 vector ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56065031/