Walters.Robert Posted December 6, 2018 Share Posted December 6, 2018 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
silent Posted December 7, 2018 Share Posted December 7, 2018 Hi Robert, A small test scene (if it can be reproduced in an empty world with a simple cubes) will surely help us to find the root cause of this issue. Could you please try to prepare it? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Walters.Robert Posted December 14, 2018 Author Share Posted December 14, 2018 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
silent Posted December 17, 2018 Share Posted December 17, 2018 Have you tried to update GUI in update() method as well? How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts