I tried to make an artificial horizon for my flight simulator. It’s a view entity-ball. The upper part is blue (sky) and the lower part is green (earth). How can I make the view-enitity move like the horizon? (even when flying upside down and in every direction) I tried it but every time it works I discover, that it isn’t working at a special angle.
Last edited by Freddy; 07/02/0621:52.
Re: Creating an artificial horizon
[Re: Freddy_dup1]
#80212 07/02/0611:5407/02/0611:54
this is code that i am using for my skybox,, its generally a huge geosphere model that follows player all the time, making a nice sky effect,,,
Code:
function follow_player() // Used for Skyglobe { while (1) { my.x = camera.x; my.y = camera.y; //my.z = camera.z +1; //If you have a space flight level or something, you can turn this on. WAIT (1); } }
Action Skyglobe {
my.hidden = on; my.passable = On; my.nofog = On; my.unlit = On; my.ambient = 100; follow_player(); //---------------------- sun_light = 10; // Amount of Light sun_angle.pan = 360; // Compass Direction the Light will come from sun_angle.tilt = 30; // Sunlights Hight //--------------------------- }
just apply it to your horizon model
Last edited by raymich; 07/02/0611:54.
Re: Creating an artificial horizon
[Re: raymich]
#80213 07/02/0621:5007/02/0621:50
but I meant the instrument that can be found in a aircroft cockpit. It's a ball that moves like the horizon. (ask google) (I changed the title of the post) Can someone help me? It's difficult because it's a view-entitiy.
Last edited by Freddy; 07/02/0621:53.
Re: Creating an artificial horizon
[Re: Freddy_dup1]
#80214 07/02/0623:5107/02/0623:51
but that works only at some angles. Sometimes when I fly up it shows the green side and sometimes the blue - depending on the angles of the plane. Maybe I need something like: ang_add, ang_rotate...
Re: Creating an artificial horizon
[Re: Freddy_dup1]
#80216 07/03/0602:5607/03/0602:56
Try using a view entity in the shape of a sphere. From there, set the tilt and roll. The artificial horizon indicator doesn't use pan (that's the function of the compass), but it uses tilt (up and down) and roll (as from banking).
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
Re: Creating an artificial horizon
[Re: ulillillia]
#80217 07/03/0605:2607/03/0605:26