Jump to content

Aircraft Heads Up Display (HUD)


photo

Recommended Posts

I'm trying to build a heads up display overlay.  Right now I'm keeping it simple and just using widgets to display text as a screen overlay.  I'm having problems with the unigine script functions camera.getPosition()  it seems like it occasionally skips when being called.  I'm try to get velocities by dividing my change of position by the physics framerate within the flush() function.  The values I get will generally be pretty steady (90% of the time) but the other 10% the calculation doubles one frame and then drops to zero the next.

Video of the issue

 

 

 


 

 

Link to comment

I've tested with a default scene (no CIGI plugin) and I can not reproduce the error.  The only thing that I can think of is that it has to do with a slight mismatch in refresh rate between the host and the 60 hz flush() update rate.  It appears that the flush() function will occasionally receive the same reported position twice in a row, making the distance between the two time steps zero and hence the speed for that update equals zero as well.  Consequently when flush() polls for the position during its next step it appears that the camera has moved twice as far and the distance and thus speed doubles.

Link to comment
×
×
  • Create New...