Amerio.Stephane Posted February 9, 2021 Share Posted February 9, 2021 Hello, I'm using a component to display the distance of the current camera to a node. At the moment I use Game::getPlayer()->getPosition() but apparently the returned player is not what I expect in IG mode. When I activate "ig_debug 1" and go in free camera (F key), then the game player is actually what I expect. So am I doing something wrong? (In the end, I need the distance from a node to the camera currently displaying the scene, whatever it is) Thanks Link to comment
cash-metall Posted February 10, 2021 Share Posted February 10, 2021 Hello 16 hours ago, Amerio.Stephane said: At the moment I use Game::getPlayer()->getPosition() but apparently the returned player is not what I expect in IG mode. Everything should work correctly. Try to use Game::getPlayer()->getWorldPosition() instead. What type of the error? When does the entity move? We need more information about it. Link to comment
Amerio.Stephane Posted February 10, 2021 Author Share Posted February 10, 2021 Duh! Of course it was that. WorldPosition. Sorry for missing something so obvious :( Thanks! Link to comment
Recommended Posts