IKFollower is intended to be used to help particle systems sync up with their proper location after the IK has been solved, so you can shoot particles out of your hand into world space without having to use RigidBodies. This is far more optimal and has almost no performance cost.
For proper usage, this is how you should set it up:
Make an empty GameObject that is the child of one of the following IK-following bones:
- Left or Right Hand
- Hips (for FBT)
- Left or Right Foot (for FBT)
- Putting the IKFollower script on an object that is a child of any other bone will result in odd behavior.
- Attempting to animate the object that the IKFollower is on will cause issues. Don't do this!
In that GameObject, add the VRC_IKFollower script as a component. You can also add your ParticleSystem here. Ensure it is set to World Space simulation!
You may want to offset the GameObject from the position so that it matches up with a gesture. For example, if you wish to have a particle shoot out of your finger when you do the "fingergun" gesture, you'd want to offset the GameObject to the approximate position of your index finger while in that pose, while retaining the Hand as the parent for the GameObject.
As of VRChat 2020.1.1, the Unity Constraints system is available for use on VRCSDK2 avatars. You may want to consider exploring those as an option for constraining objects to others.
Updated 4 months ago