So I dont know how often this comes up for other coders, but it comes up often enough for me to want to make note of this process.
This method only works if your parsing you code as PHP.
First create a simple index.php file and add the following code to it.
And that’s it. You now have the host name of your client set in the Java Script var clientHostName. Easy!
Its been q while since I had anything interesting to post up here so I thought I would do a catch up post for ya’ all.
OSD development is now on hold also. The users it has are happy with its current functionality so why poke at it. Further development of OSD will be on a per client request basis. Solutions developed for clients that are deemed to befits all users will be pushed up to the main branch where possible and practical. Also note that if no further development of OSD is requested by this time next year I will release OSD as an open source project for anyone that wants it.
As you may have seen here, I have started work on a game project called Dyson Wars. Dyson Wars is now my flag project. Details of it and the dev process can be found at dysonwars.com/deblog. Please check it out as I think its going to be an awsome game when compleated.
Lastly is my ‘tinker’ project called Survive this then! No site or devblog for this one yet. Its been in development for about three months now and I plan on a release just before Christmas this year. STT! is a top down 2.5D puzzle/shooter for the android and Windows markets. Simple in design and game play but massive on innovation and adictiveness. Using your own music play lists, this game tailors its graphics, game style and tempo to you. You decide what music you want in your play list and the game speed adjusts to match the beats of your tunes as you play. Play fast rock and get alien invasions, play classical and get butter flies and tweety birds. Play punk and get skin head mashers chasing you as you work to solve puzzles and earn coins to buy power ups and solutions or even new play styles when more are added. I plan on pushing out a simple limited/add supported version for free with the full version selling for around $2.00. The paid version will include more game themes, no adds, cheaper power ups and more levels.
Here is a test app to help explain how to find a vertex in a geometry and attach another geometry to the vertex…..
All that code below will give you something like this:
what it shows you…
Check out the comments in the code for details on whats going on, but use the left mouse button to drag the yellow ball. The red arrow shows you where the pick is currently on the surface of the sphere. Release the mouse and the yellow ball sticks to the sphere. Enjoy. Press T to toggle snapping and watch as the yellow ball jumps from vertex to vertex..wow!.
UPDATE : I found an issue in my first version that caused the yellow ball to be placed in the wrong location if the picked geometry was moved from 0,0,0. This version shows how snapping can be done between separate geometries. I intend to write a better demo to show how to move nodes around and dock them to other nodes using this method. Watch out for that next week.
The Main file. You will need the mouse sensor control below also.
This simple method for JME3 returns Boolean true if the given spatial is with the radius from the given center point.
This control class adds eight points of rotation to a spatial. this version was written for use with a spatial attached to the GUINode. It can be applied to Nodes on the rootNode as well with just a bit of tweaking.
this is the GUINODE version
And this is the RootNode version.