MyAvatar.sessionUUID returns information about avatar position in 3d space


#1

The docs say that MyAvatar.sessionUUID should return the session ID. Instead i got this:

script:print()<< “{“x”:429,“y”:275,“button”:“LEFT”,“deviceID”:0,“isLeftButton”:true,“isRightButton”:false,“isMiddleButton”:false,“isShifted”:false,“isMeta”:false,“isControl”:false,“isAlt”:false}”

I used it in a click event:

this.clickReleaseOnEntity = function(entityID, sessionUUID, mouseEvent)

Now even if i used it in the wrong event, it should still return anything but this, or am i wrong ?


#2

Hi Adin,

I’m not sure what your code looks like, but the signature for clickReleaseOnEntity is: function(entityID, mouseEvent).

It looks like maybe you are trying to pass sessionUUID into your function? In your example that won’t actually pass anything into the second parameter. Instead, you are creating a function that takes 3 parameters. Because parameters are passed by position, not by name, the second parameter (sessionUUID) will actually be the mouseEvent, which is the second parameter to the clickReleaseOnEntity callback function.

Hopefully that makes sense.

Ryan


#3

Nevermind i understand now.