Hi,
I'm working on a number of simObjects animations that have their visibility turned on or off depending on the time of day. Typically the schedule is on the hour or on the 1/2 hours.
The animation duration is 100 seconds (3000 frames) and I only want the animation to be visible for this length of time to prevent it looping.
I'm using this code to control the visibility, however the sim doesn't always turn the animation visibility on at precisely 01:00 or 02:00 etc. Instead it can be upto 90 seconds, or more, late. When this delay occurs the animation starts at the beginning but gets turned off after 10 seconds (100 seconds - delay) because the visibility 'window' is only 100 seconds and the timing for turning the visibility off 100 seconds after the hour start appears to be very precise.
Is this a know problem or is there a workaround for it in the code?
Code snippet
<ModelBehaviors> <Include ModelBehaviorFile="Asobo\Generic\FX.xml"/> <Component ID="Launch-schedule" Node="starship"> <Visibility> <Parameter> <Code>(E:LOCAL TIME, seconds) 3600 % 0 >= (E:LOCAL TIME, seconds) 3600 % 100 <= and</Code> </Parameter> </Visibility> </Component> </ModelBehaviors>
The animation is working really well but I'm struggling with the timing.