Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.
By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.
TIME OF DAY enum : 1 = Day ; 2 = Dusk/Dawn ; 3 = Night
(E:Time of Day,enum) 3 == if{ L:Night,bool) }
(E:Time of Day,enum) 1 == if{ L:Day,bool) }
(E:Time of Day,enum) 3 != if{ L:Not_Night,bool) }
<Code>(E:LOCAL TIME, Seconds) 36000 >= (E:LOCAL TIME, Seconds) 64800 <= and (A:AMBIENT PRECIP STATE, mask) 3.0 < and (E:Time of Day, enum) 2 < and if{ 1 } els{ 0 } </Code>
Thank you so much, I will have fun watching them.To obtain what you want you need two separate mesh in your glTF (one animated and one still)
Than, with a Simboject, you can control the visibility based upon time of the day
Some tutorial to get you started
Inviato dal mio Mi 9 Lite utilizzando Tapatalk
I use mostly notepad for this small snippets,Thank you so much, and English is my FIRST and only language. I'm too used to having Visual Studio correct me.
Martin
I hadn't thought of using the VS Editor like that. Great idea! The correction to Visibility fixed the test file immediately. Now I have to get the beacon working correctly. I assume that this method only works with meshes, as opposed to Collections? My beacon has a light-sun in front of each lens that must spin with the beacon. I think this might turn out to be the next major challenge.I use mostly notepad for this small snippets,
(And if you have watched the tutorial I'm making errors too!)
but sometimes I use visual studio code for .XML, there is a validation file in the SDK docs called bglcomp.xsd you can use 🤓
Great! That will add some more to play with. Right now, the animated beacon disappears at dusk. so a way to go. - Looking for spelling mistakes lol!Actually it is "node" based, and by node I mean the gltf node
So, if you parent your light to your mesh it is likely to work (never tried that but should be)
Also, your mesh, being a beacon, thus being rotated, should be parented to an empty because of...performance? Dunno, Asobo parent everything is moving to emptys
So you will end up with
EmptyDay
-- meshDay
---- lightDay
And your Component node will be "EmptyDay" or such
Inviato dal mio Mi 9 Lite utilizzando Tapatalk
Thanks Colin, I must have corrected that later and forgotten all about it.Another issue with the code
<Code> (A:TIME OF DAY,enum) 1 != if{ 1 } els{ 0 }</Code>
A: is Aircraft variable no good
should be
<Code> (E:TIME OF DAY,enum) 1 != if{ 1 } els{ 0 }</Code>
E: is Environment variable
ColinJ
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{eac09140-d30d-42fb-81e4-5a6a4cd8c2d1}" version="1.1">
<LODS>
<LOD minSize="0" ModelFile="Secret.gltf"/>
</LODS>
</ModelInfo>
<ModelBehaviors>
<Component ID="secret" Node="Night">
<Visibility>
<Parameter>
<Code> (E:TIME OF DAY, enum) 3 == if{ 1 } els{ 0 } </Code>
</Parameter>
</Visibility>
</Component>
</ModelBehaviors>