Hello world !
[b]
MY INTRODUCTION :[/b]
First, please, keep in mind that I am a french dude and that my knowledges in english are not as good as our vine…
( Sorry in advance, then, for all orthografik and syntaxik mistakes… )
We can now speak about 3D ( Well, let’s try… )
As the title means, I am trying to make a “doom-like” behavior with java3D. I ever know that there are a lot of others API and Engines in Java which are more oriented in 3Dgames… ( I have ever tried a look onto the “GAME/FPS/” - section of this Forum where I found a lot of intersting things about that : JOGL, LWLGL, J-MonkeyEngine, Xith3D, etc… ) But I would really like to make my own game with Java3D since I have ever made some efforts to understand its packages.
I know that it ever exists a famous Java3D game-engine (perhaps the only one, huh ? ) called HUMID ( With which had been computed a network game like QUAKE, named JAMID, ever in 2001 ! ! ! ) but I don’t know if it is open source and I never did success in finding it…
HUMID : Where are you ? :’(
I know that I can even find an exemple of this “kind of camera-navigation” here :
http://www.java2s.com/ExampleCode/3D/SimpleDOOMstylenavigationofa3DsceneusingJava3D.htm
The authors made here a keyBehavior.class which applies some transform3D on the viewPlatform.
These transform3D use setTranslate, rotX, rotY and rotZ, but HEADING has been disactivated.
I have tried it in re-activating these options, and there are then errors…
( There are also some helps, but too incomplete for me, in a book called “Killer programming in Java” )
Well, ALL THIS, to mean that after a long prospection, I did not success in find one only poor class which could do correctly the work, when there were a lot of one in the others engines…
Then I decided to make my own, even if i am still a little newbie, and if my study-level makes me wonder what is a vector ( < Nearly a joke… )
MY QUESTION : ( ;D Yes, it comes ! )
I have chosen to extends com.sun.j3d.utils.behaviors.vp.ViewPlatformAWTBehavior :
Well, I first used : transformTG.mul(rotX,rotY) but, if I could rotate my view horizontally ( PITCH ) and vertically ( ROLL / HEADING ) - and this, where I decided to translate - there was still a problem :
my YAW-rotation was also changing !
Then, I replace rotX and rotY by my own quaternion, but the problem stays the same ( I guess it must be logical… ) :
In fact, when I make little circles with my mouse ( makes then change PITCH and ROLL as attended ) the YAW is then progressively changing too : Unattended !!!..
I guess that there is then some natural mathematical relation between ( pitch & roll ) AND ( yaw ) that I have to inhibate if I want to make my behavior : :-[ But stop me, please, if I am wrong !
Please, how may I do this ?
Please, ??? how can I manage to change PITCH and ROLL and in the same time always keep my old YAW ?