我一直在搜寻所有夜晚,但找不到信息一眼看,甚至可能的话,这种信息非常令人不安。
I m使用Java3D,可以推测如何在世界空间轮换摄像机。
My left/right, and up/down rotation both happen on local space. Meaning that if I move left and right, everything looks fine. However if I look 90 degrees down, then look 90 degrees right, everything appears to be on its side.
目前,我做了以下工作。 这将产生上述效果:
TransformGroup cam = universe.getViewingPlatform().getViewPlatformTransform();
Transform3D trfcam = new Transform3D();
cam.getTransform(trfcam);
trfcam.mul(Camera.GetT3D()); //Gets a Transform3D containing how far to rotate left/right and how far to move left/right/forward/back
trfcam.mul(Camera.GetRot()); //Gets a t3d containing how far to rotate up/down
cam.setTransform(trfcam);
Alternatively, one thing I tried was rotating the root, but that rotates around 0, so if I ever move the camera away from 0, it goes bad. Is there something available on the web that would talk me through how to achieve this kind of thing? I ve tried a lot of different things but just can t seem to get my head around it at all. I m familiar with the concept, as I ve achieved it in Ogre3D, just not familiar with the law of the land in J3D.
提前收到答复: