Jump to content

Lights blinking


photo

Recommended Posts

Hello. I'm trying to set up lights and make them blink. 

Found this Manual section

https://developer.unigine.com/en/docs/2.7.3/ig/properties_setup

I created new project as IG. Opened world and added BE-200 node, made lights visible, but they don't blink. All properties files selected as shown in manual. But nothing happens. Maybe I need to run some script or action?

I want to use this method in other scenes but don't know how to make it work. Please help. Thank you.

Link to comment

IG logic does not work in the Editor.
to turn on the lights, you must control the aircraft through the host. 

If you do your logic for IG, you can also control the light through the code. Example:

IEntity *entity = ig_manager->getEntity(__entity_id__);
//__component_id_from_config__ - see data/ig_config.xml
PropertyPtr p_light_outer = entity->getComponent(__component_id_from_config__)->getProperty();
p_light_outer->getParameterPtr("landing")->setValueToggle(1);
p_light_outer->getParameterPtr("taxi")->setValueToggle(1);
p_light_outer->getParameterPtr("navigation")->setValueToggle(1);
p_light_outer->getParameterPtr("beacon")->setValueToggle(1);
p_light_outer->getParameterPtr("strobe")->setValueToggle(1);
p_light_outer->getParameterPtr("logo")->setValueToggle(1);

 

Link to comment

Is there any way to make similar method for editor? I have many light with different color and blinking range. I would like to see blinking while I'm editing the scene. Thank you.

Link to comment

Hello, currently, there's no way to work with app logic in the editor.

If you want just to make them blink (only visual effect with no logic) you can do it with Tracker Tool: https://developer.unigine.com/en/docs/2.7.3/videotutorials/essentials/tracker

Thanks.

 

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
  • 2 weeks later...

I set up animation of blinking light in the Tracker. Saved *.track file. How to make the animation play in a loop when the scene is loaded? I mean, when I load the project I need the light blinks in a loop.

Link to comment

If you want to loop your track in the editor just open tracker tool and load your *.track file and press "Loop" button in the Tracker.

If you meant using track file in your application you'll have to load a track via code:

Thanks!

 

 

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...