nicolay.nicolay Posted May 15, 2020 Posted May 15, 2020 Hi, I just beginner in Unigine engine can you explain to me how to switch camera. For example i can get any node from Editor Unigine::World::getNodeByName("Some_NodeName"); If i right understand, i need change camera in current player like this: Game::getPlayer()->setCamera(SomeNewCamera) I can create new camera and setup any settings for it but there is question: Can i get camera like "node" from editor?
morbid Posted May 15, 2020 Posted May 15, 2020 Hello, Yes, that should work, but you only have to switch the players: NodePtr player_node = World::getNodeByName("new_player"); PlayerPtr new_player = checked_ptr_cast<Player>(player_node); Game::setPlayer(new_player); Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts