Rotation entity go wrong when it moves if the domain is still loading


#1

I fixt some code bugs, but it still happens.
I have entity that start to move when you click it, there’s angulair velocity set etc.
The problem is that when you click on the entity before the doamin is loaded. in this case the skybox. the position if the entity is extreme off from where it need to be. it’s stopping to fast. And that is to blame on the skybox loading.

And if the movement is wrong, the parameters you get back when you read the rotation as example are wrong to. and then everything get screwed.

The script is running from inside the entity.

Not see straight a solution how to intercept this, to avoid it can happen. I keep anyway digging in the javascript code, in case i missed something again.


This is how it looks when i click the entity while it’s loading the counter is my object that moves. It stops moving to early ! around 50 instead of 80

05/15 21:30:43] [DEBUG] script:print()<< 14  =  
[05/15 21:30:43] [DEBUG] script:print()<< 14  =  
[05/15 21:30:44] [DEBUG] script:print()<< 14  =  
[05/15 21:30:44] [DEBUG] script:print()<< 14  =  
[05/15 21:30:44] [DEBUG] script:print()<< 14  =  
[05/15 21:30:44] [DEBUG] script:print()<< 14  =  
[05/15 21:30:45] [DEBUG] script:print()<< 14  =  
[05/15 21:30:45] [DEBUG] script:print()<< 14  =  
[05/15 21:30:45] [DEBUG] Starting request for: https://hifi-public.s3.amazonaws.com/images/SkyboxTextures/TropicalSunnyDay1024Compressed2.jpg
[05/15 21:30:45] [DEBUG] Shader url:  QUrl("https://s3.amazonaws.com/Oculus/shadertoys/toySkybox.fs")
[05/15 21:30:45] [DEBUG] Starting request for: https://s3.amazonaws.com/Oculus/shadertoys/toySkybox.fs
[05/15 21:30:45] [DEBUG] script:print()<< 14  =  
[05/15 21:30:45] [DEBUG] Starting request for: atp:
[05/15 21:30:45] [DEBUG] "atp:
[05/15 21:30:45] [DEBUG] Starting request for: atp:
[05/15 21:30:45] [DEBUG] Request finished for atp:
[05/15 21:30:45] [DEBUG] Request finished for https://hifi-public.s3.amazonaws.com/images/SkyboxTextures/TropicalSunnyDay1024Compressed2.jpg
[05/15 21:30:45] [DEBUG] Request finished for https://s3.amazonaws.com/Oculus/shadertoys/toySkybox.fs
[05/15 21:30:45] [DEBUG] Finished loading: https://s3.amazonaws.com/Oculus/shadertoys/toySkybox.fs
[05/15 21:30:45] [DEBUG] "atp:
[05/15 21:30:45] [WARNING] kinematic timestep =  71672.8  truncated to  1
[05/15 21:30:45] [DEBUG] Request finished for atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] OBJ Reader material library "
[05/15 21:30:45] [DEBUG] OBJ Reader WARNING: "
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] Finished loading: atp:
[05/15 21:30:45] [DEBUG] script:print()<< 41  =  
[05/15 21:30:46] [DEBUG] script:print()<< 46  =  
[05/15 21:30:46] [DEBUG] script:print()<< 50  =  
[05/15 21:30:46] [DEBUG] script:print()<< 50  =  

It looks for me that scripting get interrupted in some way.
In normal conditions (bugs excluded) it’s counting up to 80.
The printing is done with interval timer, to explain the steps.

[05/15 21:38:13] [DEBUG] script:print()<< 10  =  
[05/15 21:38:14] [DEBUG] script:print()<< 19  =  
[05/15 21:38:14] [DEBUG] script:print()<< 27  =  
[05/15 21:38:14] [DEBUG] script:print()<< 34  =  
[05/15 21:38:14] [DEBUG] script:print()<< 40  =  
[05/15 21:38:15] [DEBUG] script:print()<< 46  =  
[05/15 21:38:15] [DEBUG] script:print()<< 50  =  
[05/15 21:38:15] [DEBUG] script:print()<< 55  =  
[05/15 21:38:15] [DEBUG] script:print()<< 58  =  
[05/15 21:38:16] [DEBUG] script:print()<< 62  =  
[05/15 21:38:16] [DEBUG] script:print()<< 64  =  
[05/15 21:38:16] [DEBUG] script:print()<< 67  =  
[05/15 21:38:16] [DEBUG] script:print()<< 69  =  
[05/15 21:38:17] [DEBUG] script:print()<< 71  =  
[05/15 21:38:17] [DEBUG] script:print()<< 73  =  
[05/15 21:38:17] [DEBUG] script:print()<< 74  =  
[05/15 21:38:17] [DEBUG] script:print()<< 76  =  
[05/15 21:38:18] [DEBUG] script:print()<< 77  =  
[05/15 21:38:18] [DEBUG] script:print()<< 78  =  
[05/15 21:38:18] [DEBUG] script:print()<< 79  =  
[05/15 21:38:18] [DEBUG] script:print()<< 80  =  
[05/15 21:38:19] [DEBUG] script:print()<< 80  =  
[05/15 21:38:19] [DEBUG] script:print()<< 81  =  
[05/15 21:38:19] [DEBUG] script:print()<< 81  =  
[05/15 21:38:19] [DEBUG] script:print()<< 82  =  
[05/15 21:38:20] [DEBUG] script:print()<< 82  =  
[05/15 21:38:20] [DEBUG] script:print()<< 83  =  
[05/15 21:38:20] [DEBUG] script:print()<< 83  =  
[05/15 21:38:20] [DEBUG] script:print()<< 83  =  
[05/15 21:38:21] [DEBUG] script:print()<< 84  =  
[05/15 21:38:21] [DEBUG] script:print()<< 84  =  
[05/15 21:38:21] [DEBUG] script:print()<< 84  =  
[05/15 21:38:21] [DEBUG] script:print()<< 84  =  
[05/15 21:38:22] [DEBUG] script:print()<< 84  =  
[05/15 21:38:22] [DEBUG] script:print()<< 84  =  
[05/15 21:38:22] [DEBUG] script:print()<< 84  =  
[05/15 21:38:22] [DEBUG] script:print()<< 84  =  
[05/15 21:38:23] [DEBUG] script:print()<< 84  =  
[05/15 21:38:23] [DEBUG] script:print()<< 84  =  
[05/15 21:38:23] [DEBUG] script:print()<< 84  =  
[05/15 21:38:23] [DEBUG] script:print()<< 84  =  
[05/15 21:38:24] [DEBUG] script:print()<< 84  =  
[05/15 21:38:24] [DEBUG] script:print()<< 84  =  
[05/15 21:38:24] [DEBUG] script:print()<< 84  =  
[05/15 21:38:24] [DEBUG] script:print()<< 84  =  
[05/15 21:38:25] [DEBUG] script:print()<< 84  =  
[05/15 21:38:25] [DEBUG] script:print()<< 84  =  
[05/15 21:38:25] [DEBUG] script:print()<< 84  =  
[05/15 21:38:25] [DEBUG] script:print()<< 84  =  
[05/15 21:38:26] [DEBUG] script:print()<< 84  =  
[05/15 21:38:26] [DEBUG] script:print()<< 84  =  
[05/15 21:38:26] [DEBUG] script:print()<< 84  =  
[05/15 21:38:26] [DEBUG] script:print()<< 84  =  
[05/15 21:38:27] [DEBUG] script:print()<< 84  =  
[05/15 21:38:27] [DEBUG] script:print()<< 84  =  
[05/15 21:38:27] [DEBUG] script:print()<< 84  =  
[05/15 21:38:27] [DEBUG] script:print()<< 84  =  
[05/15 21:38:28] [DEBUG] script:print()<< 84  =  
[05/15 21:38:28] [DEBUG] script:print()<< 84  =  
[05/15 21:38:28] [DEBUG] script:print()<< 84  =  
[05/15 21:38:28] [DEBUG] script:print()<< 84  =  
[05/15 21:38:29] [DEBUG] script:print()<< 84  =  
[05/15 21:38:29] [DEBUG] script:print()<< 84  =  
[05/15 21:38:29] [DEBUG] script:print()<< 84  =  
[05/15 21:38:29] [DEBUG] script:print()<< 84  =  
[05/15 21:38:30] [DEBUG] script:print()<< 84  =  
[05/15 21:38:30] [DEBUG] script:print()<< 84  =  
[05/15 21:38:30] [DEBUG] script:print()<< 84  =  
[05/15 21:38:30] [DEBUG] script:print()<< 84  =  
[05/15 21:38:31] [DEBUG] script:print()<< 84  =  
[05/15 21:38:31] [DEBUG] script:print()<< 84  =  
[05/15 21:38:31] [DEBUG] script:print()<< 84  =  
[05/15 21:38:31] [DEBUG] script:print()<< 84  =  
[05/15 21:38:32] [DEBUG] script:print()<< 84  =  
[05/15 21:38:32] [DEBUG] script:print()<< 84  =  
[05/15 21:38:32] [DEBUG] script:print()<< 84  =  
[05/15 21:38:32] [DEBUG] script:print()<< 84  =  
[05/15 21:38:33] [DEBUG] script:print()<< 84  =  
[05/15 21:38:33] [DEBUG] script:print()<< 84  =  
[05/15 21:38:33] [DEBUG] script:print()<< 84  =  
[05/15 21:38:33] [DEBUG] script:print()<< 84  =  
[05/15 21:38:34] [DEBUG] script:print()<< 84  =  
[05/15 21:38:34] [DEBUG] script:print()<< 84  =