Is there a way to get the elevation of the surface where your avatar is standing?


I.e., the y value of the point on the surface that your avatar is standing on.

Using the default “being of light” avatar, MyAvatar.getJointPosition(“LeftFoot”).y gives a y value that is 0.111m too high. MyAvatar.getJointPosition(“LeftToeBase”).y gives a y value that is 0.014m too high. And MyAvatar.getJointPosition(“LeftToeEnd”).y gives a y value of 0.0 (i.e., joint not present in skeleton).


I couldnt get the info, so I just used a raytrace to do the distance, as you can see with my Avatar Follower Script.

I am guessing you could use that information, and correlate it with the height of the Toe / Foot and then apply the MyAvatar.skeletonOffset to set the Skeleton at the correct height.


Thanks very much, @Menithal … I overlooked findRayIntersection().


yes, use ray casting because your avatar might be in various animation contorted positions and it is not clear how faithful the offsets are maintained or if they are at all accurate once the avatar is parented to something else.