Results 1 to 9 of 9
 01042014, 06:12 PM #1Senior Member
 Join Date
 Jan 2013
 Posts
 124
 Rep Power
 0
Java 3D game: 3d space, camera positioning
I dont have any code to show, because im still trying to figure out how to do it.
1: 3D space. How do i define the space where i will make my world? Is there a certain point that i will define as 0,0,0 or is there some other way.
2: Camera positioning. When i have the 3D space, how to i make it so that the camera will show that what i want it to show. Lets say il define its lokatios 30,50,100 and direction is NW, then how to i make it so that is see the SW direction from the point 30,50,100?
 01052014, 03:40 AM #2▼ dafuq did I do?
 Join Date
 Dec 2013
 Posts
 204
 Rep Power
 0
 01052014, 10:01 AM #3Senior Member
 Join Date
 Jan 2013
 Posts
 124
 Rep Power
 0
Re: Java 3D game: 3d space, camera positioning
Well id prefer to do this with java libaries, just for learning. To get a better understanding of how this works. I have the calculation to create 3D projection(only one variable needm ore research) and i have the calculation for camera rotation. Just need to know how to create the space and how to position camera so that it will show what i want i to show.
 01052014, 12:47 PM #4▼ dafuq did I do?
 Join Date
 Dec 2013
 Posts
 204
 Rep Power
 0
 01062014, 05:55 PM #5Senior Member
 Join Date
 Jan 2013
 Posts
 124
 Rep Power
 0
Re: Java 3D game: 3d space, camera positioning
Anyone else? I would like to try and use quaternical formula and 3D projection formula... but i dont know how do i but the X Y Z coordinates in. Where to i get the space coordinates.
 01092014, 01:54 AM #6Senior Member
 Join Date
 Oct 2012
 Posts
 176
 Rep Power
 4
Re: Java 3D game: 3d space, camera positioning
I am sorry to say that I dont believe java works in 3 dimensions althought if you watch this 3D Programming With Java Tutorial 3  2D Square to 3D Cube  YouTube it may help. I HAVE NOT WATCHED THIS VIDEO. Now althought I do not no any direct way to make 3d games, this is programming if you have the right know how anything is possible. Also you might want to try a game making software. I started on Unity that has extactly what you are asking for except you can only program in JavaScript,C#, and Python
 01092014, 04:09 AM #7Senior Member
 Join Date
 Jan 2013
 Posts
 168
 Rep Power
 3
Re: Java 3D game: 3d space, camera positioning
Java does work in 3 dimensions. If you think about it, it's all about the perspective that you make. A cube is just six rectangular faces drawn at different perspectives. It is complex but 3d can be done with any language that has graphics.
 01092014, 10:39 AM #8
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,128
 Blog Entries
 7
 Rep Power
 24
Re: Java 3D game: 3d space, camera positioning
There are several possibilities: e.g. let your 3D model be somewhere near (0,0,0) and give your camera a location not at (0,0,0) 'aiming' towards (0,0,0); it doesn't matter where (0,0,0) is, it's an infinite 3D space and you define it anywhere you want it to be. An alternative is to position the camera at location (0,0,0) and the subject somewhere else, but I prefer the first alternative.
kind regards,
JosThe only person who got everything done by Friday was Robinson Crusoe.
 01092014, 10:47 AM #9Just a guy
 Join Date
 Jun 2013
 Location
 Netherlands
 Posts
 5,094
 Rep Power
 8
Re: Java 3D game: 3d space, camera positioning
Of course not, neither does your computer so why would any programming platform? This is about 3D projection, which is on a 2D surface in the form of your flat computer screen (or multiple 2D surfaces). And that's all math, it is not bound to any tool, OS, computer or programming platform  math is a universal language and tool. You could do it on your calculator if it is advanced enough to rasterize graphics. They did it on 8 mhz Amiga computers in the early 90's.
"Syntactic sugar causes cancer of the semicolon."  Alan Perlis
Similar Threads

need help with space invader game
By ChaosProjects in forum New To JavaReplies: 6Last Post: 05142013, 04:25 AM 
Hmmm how do I make a camera follow the player? (Platformer game)
By Lionlev in forum Advanced JavaReplies: 7Last Post: 12032012, 10:31 PM 
positioning on java applet
By The original stinger in forum Java AppletsReplies: 9Last Post: 01072012, 11:21 AM 
Unknown error during runtime in space craft game code execution...
By dino_prd in forum New To JavaReplies: 0Last Post: 11042011, 02:36 PM 
Problem with Space Invaders Game
By andyman99008 in forum New To JavaReplies: 8Last Post: 12192010, 10:20 PM
Bookmarks