Allow parenting objects to player bones, player position and player tracking data
in progress
Reimajo
Since bone transforms aren't exposed, we can't parent objects to players and need to use expensive and complicated update loops for such a basic task, which also results in ugly/janky object movements and low performance.
Please give us a simple function like .SetParent(Transform t, Boolean b) for .GetTrackingData(VRCPlayerApi.TrackingDataType.x) and .GetBonePosition(HumanBodyBones.x) and for VRCPlayerApi.GetPosition
Log In
DrBlackRat
I think instead of defining it via a script it should be something like a "PlayerFollower" component that acts similar to a VRC Parent Constraint that you can configure.
Fax
updated the status to
in progress
Fax
Merged in a post:
Attach objects to avatar bones
Zarniwoop
Add an option to the SDK to enable attachments to certain parts of an avatars (Hip, chest, lower arm, head etc..) for pickup objects.
This would only work for humanoid avatars of course.
If you held a hat object and if you dropped it near your headbone, if it was set up correctly you would wear it like a hat, put a pistol on your leg like a holster or maybe even have a quiver on your back to pull out arrows from.
There would be actions to be able to equip pickups (And have an option to disallow users to unequip them) directly to players via triggers.
Fax
Merged in a post:
Add a way of getting a constructed ConstraintSource for one of a player's bones
FairlySadPanda
At the moment to set something to the location of a player's bone is a heavy Update-based operation.
If VRCPlayerApi was extended so that it could return a constructed constraint source for a given bone/given weight, this would allow users to use these sources inside of a Parent/Position constraint and greatly save on CPU time.
Fax
Merged in a post:
Allow PickupProps to link to certain bones
G
GearBell
Imagine wearable props - currently props when clicked are linked to our hand bone, if possible can we be given an option of being able to choose a bone we want the prop to be attached to when creating a world? Detected bones in the rigging system will give us the available bones. Head for hats, chest for costume, forearm for shield, etc. All of this can be adjusted by the creator of a world for thier world.
Fax
Merged in a post:
Please expose a method on VRCPlayerApi to return a ConstraintSource bound to a human body bone
bd_
It would be very useful for performance to be able to have world objects track bones without needing to run a PostLateUpdate loop. I understand that actually exposing a Transform might be a lot of work, particularly around the Udon object filtering system; however, by adding a method to VRCPlayerApi that returns a ConstraintSource bound to the human body bone in question, this can be returned to the Udon code in a way that is hidden from the object filter, but only usable as a constraint source (avoiding other avatar object manipulations). This would achieve the desired performance improvements with a minimum of implementation work.
DrakenStark
Any kind of function to create an exposed dummy object that is parented accordingly would be amazing. Any support for this would go a long way to enabling better hitboxes, custom HUDs, and one less hoop to jump through for some shader effects.
As is for OnPlayerEnterTrigger events, the local player has a full capsule, while non-local players seem to have a sphere that only goes up to their waist. There's a necessity to work around this with custom hitboxes for projectile collision, which raycasting is not always ideal for. Player based object parenting would go a long way to work around this, while also allowing for more flexibility with head, limb, and finger detection.
Please add this capability to VRChat/Udon/UdonSharp! It's been years of high performance Update() function demand for FPS related worlds that could be significantly cleaned up through more native support in Unity with child objects or constraints. Only one dummy object needs to exist (via a function for on-demand creation of them) for each of whatever bone or tracking item that is sought to tie things into.
FairlySadPanda
Alternatively: bool VRCPlayerApi::AssignConstraintToBone(HumanBodyBone bone, Constraint constraint).
bd_
If there are concerns about directly exposing player bones to Udon (where Udon scripts could potentially pose the player's avatar, for example), other options include e.g.:
- Creating a proxy transform parented to the bone, and exposing that transform (only) to Udon (note that this risks destroying world objects on avatar unload, possibly this should reparent any children of the proxy to the scene root before unload)
- Adding an API to link a constraint on a world object to a player bone transform
LunaDelrey
+1, and I'm surprised that after a year there hasn't been any feedback on this yet. I've been trying to attach things to players with udon, and the syncing of things just isn't optimal, both client and server side.
Add to that the fact that bone rotation can be even more janky and a direct parent to the bones would honestly solve all of this jank.
Load More
→