nicolay.nicolay Posted June 23, 2020 Share Posted June 23, 2020 (edited) I need to do custom controls. By default i can see and i can do it in World Editor But i need another controls actions. I can turn off this controls like this: Game::getPlayer()->setControlled(0); And include my own controls buttons if (App::getKeyState('w')) { //some actions } but in this case i can see in menu old control buttons(like in the firs picture) How i can write there my own buttons there and change name and actions (using for example callback) Unigine::MakeCallback<..>(...) Ptr<Controls> rr= Game::getPlayer()->getControls(); Edited June 23, 2020 by nicolay.nicolay Link to comment
alexander Posted June 25, 2020 Share Posted June 25, 2020 Hi Nicolay,How i can write there my own buttons there and change name and actions All you can do is to use STATE_AUX_0 - STATE_AUX_F: https://developer.unigine.com/en/docs/2.11/api/library/controls/class.controls?rlang=cpp Then you need to show them in the Main Menu. Change the sdk/data/core/unigine.ui and sdk/data/core/scripts/system/system.h files (it is trivial). P.S. But, I recommend to you creating your own Controls System. Our system very difficult to modify. Best regards, Alexander Link to comment
Recommended Posts