Creating a Solar System with Element Heirarchy
We've been hassling the programming department for ages about getting element hierarchy happening in VastPark. You can imagine my surprise when I was told that it was up and running.
Basically what it allows user to do is to nest an element inside another, making it a child of that parent element. This means that when the parent moves the child moves with it. That's useful for all kinds of things. We can now enable avatars to "carry" things. We can finally have text showing the name of each object on top of their heads for easier identification. But I've been thinking about building a galaxy. I was told this is an experimental feature right now and is still a week away from being solid, but after a quick test, I found it solid enough and I got to work creating a Solar System.
The first thing I do in nearly all my parks is layout the elements. I wanted to make the solar system semi to scale, so every 10,000km in real world scale is equal to 1m in VastPark units.
The Sun being the center of our Solar System was the first to go in. I inserted a sphere at position 0,0,0 with a size of 139m, and named it Sun. For this example I only put in the first four planets from the Sun, so I added in four more spheres for the planets, another one for Earth's moon, named and position them all accordingly.
Grey Spheres are cool and all but they would look better with some textures on them, luckily the interweb is full of appropriate images for planets. Do a Google image search and you're bound to find the image you need. Jump into the IMML editor and in the Material Group of each sphere add in a new tag for a texture. The IMML editor has an Auto Complete function so all you have to do is use a < and then add Texture and then Source, paste in your image URL and close the tag.
It should look like the code below, with your image URL pasted in between the "".
<Texture Source="http://www.myexample/myplanet.jpg"/>
Jump back into Design view and you will see the image apply to the sphere.
The only other thing we need to add into the scene is a "dummy" for each planet. This will act as the "Parent" to each planet and will help the planets orbit around the sun. Insert 4 boxes at 0,0,0 and give them a meaningful name like "Earth Dummy".
The scene was now setup the way I wanted, everything needed for getting the planets to orbit the sun could be done in the IMML editor. To nest an element inside another all you need to do is cut the code for the element you want to make the "child" and paste it before the closing tag of the element you want to be the "parent". I nested each planet inside its "dummy" and nested the moon inside the earth.
With the element hierarchy all figured out all I had to do was create two timelines for each planet, one for its "dummy" to control its orbit, the other to control the planets rotation on its axis. I'm not going to go into detail here about how to create timelines. If you need help creating timelines there is a tutorial on them here.

That's about all there is to it, if you want to have a closer look at the park you can download it from the Creator Showcase. I tried to make the orbit's semi accurate. If you find it a bit slow you might want to crank up the orbit speeds in the respective timelines. I'll be looking to improve this further so keep an eye out for updates in the future.
Cool. Works for me - I went into the latest builds area and downloaded the latest snapshot - but seems when I come out of Interactive Preview, the planets don’t reset in their position and the application never completely returns to the design view. I can switch to IMML but switching back i’m stuck with the same problem of the Design view not working. I notice that the star map shows that it hasn’t downloaded even though it has downloaded for me as i saw it. At this point if i try exiting, it won’t exit and i have to crash it out to windows. I can restart it (i saved the park file before trying to run interactive preview) and it works fine again - until I try to run and then stop Interactive preview. Thought you should know.
It would be nice if the planets have their names as text over each of them.
Looks great btw.
I’ve tested it on a few computers here and couldn’t replicate the problem. It’s possible that the build you’re using is current, the snapshot gets updated frequently. Check to see what build number it is when you run the Creator.
Otherwise the park will work fine in the Browser thats in the snapshot, all you need to do is drag your park into the Browser once its running. To restart it all you need to do is a refresh.