Rigidbody Throw
Rigidbody Throw
Throw an object with collision against the world
⬇️ Download Latest Version
📦 Add to VRChat Creator Companion
</div>How it works
- A particle system is parented to the throw target, which emits particles as it moves.
- When the system is enabled, these particles hit the Force Collider, which adds force to the Rigidbody.
- This Rigidbody then flies forward as if thrown, and collides with the world using the Collision Collider.
- Meanwhile, Contact Senders and Receivers, in combination with Constraints, are used to figure out the position of the thrown object, and this is synced to the remote client (since parameter force is local only).
- This remote sync is not incredibly accurate to not spend too many bits on it: 25m from where you throw, with 0.2m precision, so landing location might differ slightly between local and remote.
- If you want rotation sync, install the components from the Rotation-Synced directory.
Install guide
https://github.com/VRLabs/Rigidbody-Throw/assets/76777936/57fbfe66-ddfd-4b0c-b168-e739ffc0a1ef
- Merge the Animator Controller
Rigidbody Throw FXto your own FX Controller, using the Avatars 3.0 Manager tool. - Merge the Expression Parameter List
Rigidbody Throw Parametersto your own Expression Parameter List, using the Avatars 3.0 Manager tool. - Drag & drop the
Rigidbody Throwprefab into the base of your Hierarchy. - Right click and unpack the prefab, then drag & drop it onto your avatar.
- Move
Throw Targetoutside ofRigidbody Throw/Throwand place it anywhere in your avatar's hierarchy. Adjust the transforms as needed.
How to use
- Place the objects you want to to use inside
Rigidbody Throw->Throw->Container.- Alternatively you can constrain the objects to
Container.
- Alternatively you can constrain the objects to
- Your right hand gesture must be 2 (HandOpen) for the system to release, and 1 (Fist) to reset.
- To change the friction and the bounciness, change the parameters on the
Resources/Physics MaterialPhysics Material and apply that Physics Material to your Collision Collider. - To have a custom throwing/reset condition, change the
GestureRight Equals 1 or 2conditions in theRigidbody Throw Mainlayer. - To change world collision, only use Colliders on the
Collision Colliderobject. This can be a Box Collider, Sphere Collider, Capsule Collider, but it has to be on theCollision Colliderobject.
Performance stats
Default version:
Colliders: 2
Constraints: 10
Constraint Depth: 7
Contact Receivers: 4
Contact Senders: 2
FX Animator Layers: 4
Particle Systems: 2
Rigidbodies: 2
Joints: 1
Expression Parameters: 27
Rotation synced version:
Colliders: 2
Constraints: 14
Constraint Depth: 8
Contact Receivers: 4
Contact Senders: 2
FX Animator Layers: 4
Particle Systems: 2
PhysBones: 6
PhysBone Colliders: 3
Rigidbodies: 2
Joints: 1
Expression Parameters: 51
Hierarchy layout
Default version:
Rigidbody Throw
|-Throw
| |-Throw Target
| |-Force Particle
| |-Container
| | |-Colliders
| | | |-Force Collider
| | | |-Colission Collider
| | | |-Collision Detection
| | |-Example Sphere
| |-Quick Position Sync
| | |-Position Sync
| | | |-Contacts
| | | | |-Sender
| | | | |-Receiver X
| | | | |-Receiver Y
| | | | |-Receiver Z
| | | |-Local Target
| | | |-Remote Target
Rotation synced version:
Rigidbody Throw
|-Throw
| |-Throw Target
| |-Force Particle
| |-Container
| | |-Colliders
| | | |-Force Collider
| | | |-Colission Collider
| | | |-Collision Detection
| | |-Example Cube
| |-Quick Position Sync
| | |-Position Sync
| | | |-Contacts
| | | | |-Sender
| | | | |-Receiver X
| | | | |-Receiver Y
| | | | |-Receiver Z
| | | |-Local Target
| | | |-Remote Target
| | |-Rotation Sync
| | | |-Measure Bones
| | | | |-Measure X Magnitude
| | | | |-Measure X Sign
| | | | |-Measure Y Magnitude
| | | | |-Measure Y Sign
| | | | |-Measure Z Magnitude
| | | | |-Measure Z Sign
| | | |-Measure Planes
| | | | |-X Angle Plane
| | | | |-Y Angle Plane
| | | | |-Z Angle Plane
Contributors
License
Rigidbody Throw is available as-is under MIT. For more information see LICENSE.
<div align="center"><img src="https://github.com/VRLabs/Resources/raw/main/Icons/VRLabs.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Discord.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Patreon.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Twitter.png" width="50" height="50">
</div>Keywords
No keywords found.Install via VCC
Package ID
dev.vrlabs.rigidbody-throwUnity Version
2022.3Unity Release
undefinedVRChat Version
undefined