Please expose playerEyeHeight and trackingScale to Udon
tracked
techanon
These two pieces of data would be infinitely helpful for modifying world features based on the player's view and position data without having to use unreliable avatar bone checking methods.
My use case is that I need to align a pointer to match that of the built-in UI pointer and to accurately do so, in an avatar agnostic way, I need to have access to the trackingScale value (see attachment). This value would allow me to scale the pointer raycast vectors to match the requirement.
Log In
Fax
How do y'all feel about Udon avatar scaling? https://creators.vrchat.com/worlds/udon/players/player-avatar-scaling
This request predates this feature, so we're curious how it impacts your request.
aurycat
Fax I think the eye height request is addressed by the avatar scaling API, but the trackingScale is not. See my comment below about my portals prefab. The avatar scale API is not sufficient because it doesn't include info about the player's camera scale / tracking scale, which is also dependent on their IRL height setting. The best solution currently is still the Audio Listener trick described in UdonEats's comment.
For reference, my portals prefab demo world: https://vrchat.com/home/world/wrld_c6dc655d-e665-4a26-abc9-da0617257bc0
It is now finished, using the Audio Listener trick. It would be great to have an actual API for getting the tracking scale though instead of relying on this hack.
Thanks!
aurycat
I'm working on a portals prefab, and having the player's avatar IPD is necessary for getting the portals to look right. Currently the best way I've found is Merlin's PlayspaceTracking prefab (https://github.com/MerlinVR/PlayspaceTracking) but it jitters when switching avatars and has issues with floating point precision in large worlds. Having the player camera's scale/stereoSeparation value exposed in Udon would be very helpful!
EDIT: The comment below by UdonEats does still work as of 1/2/2023! To elaborate, all that's strictly necessary is an
active
GameObject with an Audio Listener -- its scale will get set to 1/trackingScale, for mysterious reasons. However, ClientSim deletes all Audio Listener components (on active GameObjects only) in the scene when entering play mode. Adding the Audio Distortion Filter, which depends on the Audio Listener, prevents it from getting deleted. It does cause an error to be emitted in the console every time you enter playmode, though. Luckily, it seems that real in-game VRC doesn't delete Audio Listeners, and also ClientSim only checks active GameObjects, so having an inactive-by-default GameObject with an Audio Listener should work fine! It might still be good measure to add the Audio Distortion Filter anyway, just in case! Anyway, overall this method certainly seems like it could break at any time, but cool while it works! Thanks UdonEats!UdonEats
Currently, a strange way to get an IPD scale is used.
So I hope to be properly exposed to Udon.
techanon
Faxmashine
Getting the world scale for the player would be great! Often I need to scale content to suit the world scale, and at the moment there's no great way of doing that.
Kilerbomb
Something I'd like to add to this would be some way to get a VR player's left and right eye camera transforms. This would be very helpful for some rendertexture stuff that needs to be stereo-correct for any avatar size.
Momo the Monster
marked this post as
tracked