angus Posted January 31, 2018 Share Posted January 31, 2018 Hi, We received a Unigine world from a subcontractor. The world is fine however when you "run" it you can't move around using WASD. I have tried adding a PlayerActor in AppWorldLogic::init() but it makes no difference. player = Unigine::PlayerActor::create(); // I have also tried a PlayerSpectator instead of PlayerActor player->setWorldPosition(Math::vec3(0,0,20)); Game::get()->setPlayer(player->getPlayer()); It does set the player's initial position to Z+20 so I can see that its' run, but nothing I do seems to allow movement. Do you have any idea where I can look? Unigine 2.6.0.1, Editor2 Link to comment
fox Posted February 1, 2018 Share Posted February 1, 2018 Hi Angus, The first thing I would check, is whether the game logic is paused or not. You can do that by adding the following lines to your code after setting a player : if (Game::get()->isEnabled()) Log::message("Game enabled!"); else Log::message("Game disabled!"); If the answer is "Game disabled", and it was not disabled by you intentionally, then most likely your *.world file was saved with the Play button released. You can check the *.world file for the following: <game> <enabled>0</enabled> </game> You can try to fix the problem by change 0 to 1 manually in the *.world file, or you can open your world in the editor, press the Play button and save your world. Hope this helps! Thanks! Link to comment
angus Posted February 2, 2018 Author Share Posted February 2, 2018 22 hours ago, fox said: <game> <enabled>0</enabled> </game> Thank you very much, that was it. Fixed now. Link to comment
Recommended Posts