Entity change userData from other entity


#1

I found a problem, it looks like if you have 2 doors next to each other. and the left door is open first and you then open the right door. some userData get changed in the right door that seems to come from the left door.

Place two doors close enough to each other so you avatar is in the 5 meter range of the door handles (default). I have add some debug lines. The left one only write info when it’s open “print(“Left door open”);” the right one is printing the rotation angle and the userData state "configDataObject.doorIsOpen"
When am opening the left door first and then quick the right one. I get this in the log. (see log below) Now why is userData changing in the right door when the left door is changing the state of that userData field ?

The left door have different version number script then the right door.
To get it working with printing the debug lines in this way.

This is the moment the problem happens.
and the right door get broken because the left door changes userData.

[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -9  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< Left door open
[02/05 15:01:42] [DEBUG] [hifi.audioclient] injector has no more data, marking finished for removal
[02/05 15:01:42] [DEBUG] [hifi.audioclient] removing injector
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -9  -  true

[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -12  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -12  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -12  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -12  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -11  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -11  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -11  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -11  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -11  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -11  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -11  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -10  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -10  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -10  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -10  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -10  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -10  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -10  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -10  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -9  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -9  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -9  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -9  -  false
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< Left door open
[02/05 15:01:42] [DEBUG] [hifi.audioclient] injector has no more data, marking finished for removal
[02/05 15:01:42] [DEBUG] [hifi.audioclient] removing injector
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -9  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -9  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -9  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -8  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -8  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -8  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -8  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -8  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -8  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -8  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -7  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -7  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -7  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -7  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -7  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -7  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -7  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -7  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -6  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -6  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -6  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -6  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -6  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -6  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -6  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -6  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -6  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -5  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -5  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -5  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -5  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -5  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -5  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -5  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -5  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -4  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -4  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -4  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -4  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -4  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -4  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -4  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -4  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -4  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -3  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -3  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -3  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -3  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -3  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -3  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -3  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -3  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -3  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -2  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -2  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -2  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -2  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -2  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -2  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -2  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -2  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -2  -  true
[02/05 15:01:42] [DEBUG] [hifi.scriptengine.script] script:print()<< -2  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< -1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< -1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< -1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< -1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< -1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< -1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< -1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< -1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< -1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< -1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 0  -  true
[02/05 15:01:43] [DEBUG] [hifi.audioclient] injector has no more data, marking finished for removal
[02/05 15:01:43] [DEBUG] [hifi.audioclient] removing injector
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 0  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 0  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 0  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 0  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 0  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 0  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 0  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 0  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 0  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 1  -  true
[02/05 15:01:43] [DEBUG] [hifi.scriptengine.script] script:print()<< 1  -  true

You can test this with the old V1 door i have on marketplace to, as long your avatar stay in the click range set in userData. You only need to add debug lines in the function “checkRotation()” and use different script for both doors to not print to much lines to the log.

Extra info:
I have just done a test with 2 systems and 2 different avatars and 1 door for every avatar. Then it seems to work perfect. Tried it after that again with one avatar and 2 doors. IT BREAKS. Hope it get fixt soon.


Angulair velocity stops when your switching to other program in windows