Jump to content

[SOLVED] Game Player and IG View


photo

Recommended Posts

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

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
  • silent changed the title to [SOLVED] Game Player and IG View
×
×
  • Create New...