MyAvatar.rotation and pickray


#1

Testing the pickray, it works if i set the coordinate on top of the target.
But my question is what rotation format MyAvatar is ?
I cannot find any info about it in the docs, and it seems not todo much if i change things in direction.

var pickRay = {
    origin: MyAvatar.position,
    direction: Quat.getUp(MyAvatar.rotation)
    }

#2

That pickRay starts at your avatar’s position and, if you avatar is standing normally (i.e., not lying down or something) goes straight up in the air. Perhaps not what you intended?


#3

Straight up ? i need a pickray beam that looks forward. or i do it different and look what is below the object.


#4

Try Quat.getFront() … or may need to take the negative of it (z-axis direction signs can be troublesome)