Java-Gaming.org Hi !
 Featured games (90) games approved by the League of Dukes Games in Showcase (753) Games in Android Showcase (228) games submitted by our members Games in WIP (842) games currently in development
 News: Read the Java Gaming Resources, or peek at the official Java tutorials
 Show Posts Pages: [1]
 1 Game Development / Newbie & Debugging Questions / Re: Problems with rotX, rotY and rotZ on: 2004-12-23 22:15:01 I'm trying to move the perspective of the person viewing the shapes. I figured rotating the shapes in one direction would be just like moving the viewer in the opposite direction (or opposite rotation in this case). objRoot is a branchgroup that consists of all of the shapes that I have created. I added all of my shapes to objRoot before I am attempting this transformation. These are mainly spheres and ellipsoids. I'd rather move the user instead of the shapes in my transform but am unsure how to do it without simply rotating the shapes. If you view my source at the above mentioned link, the initial branchgroup that is created pretty much includes the necessary information and there isn't much beyond it that is needed.
 2 Game Development / Newbie & Debugging Questions / Problems with rotX, rotY and rotZ on: 2004-12-23 04:44:44 Hello. I am trying to get rotations about an axis to work for me but I can't get them to work. Basically I have an entire scene created and can't get it to rotate using rotX, rotY and rotZ.The scene originally places me at a point along the z-axis but I want the user to be on the x-axis. So I have tried using a 90 degree rotation about the y-axis to get the user to that point but it doesn't do anything. Below is the transformation group that I am using.// Transform Group used to rotate entire scene        TransformGroup objRotate = new TransformGroup();        javax.media.j3d.Transform3D tp3d = new javax.media.j3d.Transform3D();        double rot = 1.571;        tp3d.rotY(rot);        objRotate.setTransform(tp3d);        objRoot.addChild(objRotate);        Any ideas? You can view the full source at http://www.astroh.org/SphereMotion.javaThanks!Michael
 3 Java Game APIs & Engines / Java 3D / Re: Using KeyListener to modify a transform on: 2004-12-10 23:54:27 I figured out that NullPointerException problem and reworked some of the code, but the transforms still don't make the rotations work. Any ideas? Sourcecode has been updated.
 5 Java Game APIs & Engines / Java 3D / Re: Using KeyListener to modify a transform on: 2004-12-09 00:56:12 Thanks for the help but I now keep getting a NullPointerException when I run the program on the line: tg.setTransform(t3d); Any idea what my problem here could be? I'm running this in my keyPressed section whereas I am defining tg in a different section. My guess is that this isn't working because I don't have tg set up as a class variable as you have assumed in your reply. How do I do that?Thanks again!
 6 Java Game APIs & Engines / Java 3D / Using KeyListener to modify a transform on: 2004-12-03 05:25:17 Hello. I posted this under the Newbies category but haven't gotten anywhere so I thought I'd post it here and see if I might be able to get some more assistance.I am currently trying to take Sun's SphereMotion.java file and work it into a black hole simulator for a college project. I am trying to setup my basic geometry and am currently trying to add a KeyListener whereby I can use keyboard commands (the arrows in particular) to rotate the view around my ellipsoids. Also note that I am a newbie. The KeyListener is added to my canvas as it is the only think I could find that would allow a KeyListener to be added to. I then read online that it would be good to create a switch to tell the program when to process the rotations however I can't get it to work. It simply doesn't do anything.   Thus far I have tried adding my transforms to the BranchGroup createSceneGraph but that didn't work. Recently I tried placing the rotation transforms in their own BranchGroup and adding the other transforms for the ellispoids as a child under that BranchGroup. But this also has not worked. I'm fairly certain that my KeyListener is working. Does anybody have any suggestions on the proper way to pull this off? I have posted my code at http://www.astroh.org/SphereMotion.java since it is too long to post in this forum. Much thanks in advance! Michael
 7 Game Development / Newbie & Debugging Questions / Re: Adding a KeyListener to SphereMotion.java on: 2004-11-30 03:18:25 Try downloading the file again. It should work without those calls (at least it seems to for me using netBeans). If you do need those calls could you specify how you added those to the lines?Once it runs it should show a couple of nested ellipsoids with a smaller sphere in the center of them and another larger sphere outside of them. I also have a JPanel added to the bottom of the applet but haven't had time to work on it yet. I want to first get this keyboard command interface working before moving on to that.Thanks!
 8 Game Development / Newbie & Debugging Questions / Re: Adding a KeyListener to SphereMotion.java on: 2004-11-28 02:22:13 No, that doesn't help. The KeyListener works and does read my keys but it is the link from my keys changing my rotation variables and the transforms is where I'm having problems. You can pretty much skip the first branchgroup in my code. That just sets up my basic geometry. I have my transforms in that portion where you found the c.addKeyListener(this) and for some reason they aren't working.Thanks for the suggestion though, however, without that "c." portion my KeyListener doesn't even work.
 9 Game Development / Newbie & Debugging Questions / Adding a KeyListener to SphereMotion.java on: 2004-11-27 23:51:02 Hello. I am currently trying to take Sun's SphereMotion.java file and work it into a black hole simulator for a college project. I am trying to setup my basic geometry and am currently trying to add a KeyListener whereby I can use keyboard commands (the arrows in particular) to rotate the view around my ellipsoids. Also note that I am a newbie.The KeyListener is added to my canvas as it is the only think I could find that would allow a KeyListener to be added to. I then read online that it would be good to create a switch to tell the program when to process the rotations however I can't get it to work. It simply doesn't do anything. Thus far I have tried adding my transforms to the BranchGroup createSceneGraph but that didn't work. Recently I tried placing the rotation transforms in their own BranchGroup and adding the other transforms for the ellispoids as a child under that BranchGroup. But this also has not worked. I'm fairly certain that my KeyListener is working.Does anybody have any suggestions on the proper way to pull this off?I have posted my code at http://www.astroh.org/SphereMotion.java since it is too long to post in this forum.Much thanks in advance!Michael
 Pages: [1]
 nelsongames (16 views) 2018-04-24 18:15:36 nelsongames (12 views) 2018-04-24 18:14:32 ivj94 (587 views) 2018-03-24 14:47:39 ivj94 (49 views) 2018-03-24 14:46:31 ivj94 (400 views) 2018-03-24 14:43:53 Solater (64 views) 2018-03-17 05:04:08 nelsongames (110 views) 2018-03-05 17:56:34 Gornova (175 views) 2018-03-02 22:15:33 buddyBro (723 views) 2018-02-28 16:59:18 buddyBro (93 views) 2018-02-28 16:45:17
 KaiHH 13x ByerN 11x SHC 10x NuclearPixels 10x Zemlaynin 10x Guerra2442 9x Damocles 6x VaTTeRGeR 5x Spasi 4x orangepascal 4x philfrei 4x ags1 4x princec 3x ndnwarrior15 3x mesterh 3x Phased 2x
 Java Gaming Resourcesby philfrei2017-12-05 19:38:37Java Gaming Resourcesby philfrei2017-12-05 19:37:39Java Gaming Resourcesby philfrei2017-12-05 19:36:10Java Gaming Resourcesby philfrei2017-12-05 19:33:10List of Learning Resourcesby elect2017-03-13 14:05:44List of Learning Resourcesby elect2017-03-13 14:04:45SF/X Librariesby philfrei2017-03-02 08:45:19SF/X Librariesby philfrei2017-03-02 08:44:05
 java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org