osa Posted March 27, 2019 Share Posted March 27, 2019 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
cash-metall Posted March 28, 2019 Share Posted March 28, 2019 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
osa Posted March 28, 2019 Author Share Posted March 28, 2019 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
morbid Posted March 29, 2019 Share Posted March 29, 2019 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
osa Posted April 10, 2019 Author Share Posted April 10, 2019 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
morbid Posted April 11, 2019 Share Posted April 11, 2019 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: UnigineScript:https://developer.unigine.com/en/docs/2.7.3/editor2/tools/tracker/run/ (you also may want to check demos with tracker in SDK Browser) C++: https://developer.unigine.com/forum/topic/4068-tracker-api-calls/ Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts