04-03-2021, 08:35 AM
(This post was last modified: 04-03-2021, 08:38 AM by josemendez.)
Hi there!
There's many ways to go about this. All of them involve:
1.- Determining proximity between the hand and cloth particles.
2.- Fixing particles in place, using one of the many methods available: attachments, raw pin constraints, setting particle positions, etc.
Raycasting as Jhonatas proposes isn't really a good fit for VR, as a hand in world space doesn't implicitly define a ray direction like a mouse position in the near plane of the camera frustum does. Using colliders and contact callbacks is a better approach:
http://obi.virtualmethodstudio.com/tutor...sions.html
Once you know what particles are near/touching the hand, you can create a pin constraint for each one. This is the approach used in this thread: http://obi.virtualmethodstudio.com/forum...-2422.html
I recommend you read on collision callbacks, particle and constraint scripting:
http://obi.virtualmethodstudio.com/tutor...sions.html
http://obi.virtualmethodstudio.com/tutor...icles.html
http://obi.virtualmethodstudio.com/tutor...aints.html
There's many ways to go about this. All of them involve:
1.- Determining proximity between the hand and cloth particles.
2.- Fixing particles in place, using one of the many methods available: attachments, raw pin constraints, setting particle positions, etc.
Raycasting as Jhonatas proposes isn't really a good fit for VR, as a hand in world space doesn't implicitly define a ray direction like a mouse position in the near plane of the camera frustum does. Using colliders and contact callbacks is a better approach:
http://obi.virtualmethodstudio.com/tutor...sions.html
Once you know what particles are near/touching the hand, you can create a pin constraint for each one. This is the approach used in this thread: http://obi.virtualmethodstudio.com/forum...-2422.html
I recommend you read on collision callbacks, particle and constraint scripting:
http://obi.virtualmethodstudio.com/tutor...sions.html
http://obi.virtualmethodstudio.com/tutor...icles.html
http://obi.virtualmethodstudio.com/tutor...aints.html