vtudio / playir

Platform clients for publishing apps natively
http://playir.com
41 stars 13 forks source link

Is it possible to change the skydome model? #147

Open aliekiddo opened 9 years ago

aliekiddo commented 9 years ago

It's possible to change the skydome model in the level editor, but the changes don't save.

Sometimes the texture of sky does not suit planar mapping (flat from top down) as things are stretched and compressed nearer the horizon - where more detail is seen

mapping can be applied cylindrically so distortion occurs mostly at the pole - where it is not as visible, but this requires a different dome model with different UV mapping This type is also easier to create custom textures for.

aliekiddo commented 9 years ago

I achieved this in the Level code, in the setupLevel function with this:

this.sky.set3DModel( {"obj":"skydome_140810225301728298.obj","tex":"sky_140810225302469336.jpg"} ); this.sky2.set3DModel( {"obj":"skydome_140810225301728298.obj","tex":"sky_140810225302469336.jpg"} );

screenshot 2015-09-07 23 37 15 screenshot 2015-09-07 23 36 18

However... if I put this in the custom code section, the skydome renders, but the roads don't.
It would be nice to be able to customise this in the Level Editor.

screenshot 2015-09-07 23 35 11

I'd like to put some static objects in the distance, so I could disable the level skydome and add a custom one that way. I kind of achieved this by creating a new UI and level and running it underneath. But the view doesn't rotate with the camera.
I guess I can do this in the same way the roads are generated, but stopping them from moving in Z and respawning.
But I'm still unsure how to achieve this.

Also... How would I change the size / position / rotation of the skydome?

aliekiddo commented 9 years ago

...Fixed it... You should probably mention in the comment where onSetupLevel function lives... // Custom level setup should be written into an onSetupLevel function

// Custom level setup should be written into an onSetupLevel function in RunningGame.js