![]() |
Help Obi cloth for VR grab - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html) +--- Thread: Help Obi cloth for VR grab (/thread-2784.html) |
Obi cloth for VR grab - Narmeen - 03-03-2021 Hello How can I grab obi cloth in VR for the oculus quest integration? any advice please RE: Obi cloth for VR grab - JhonatasFarias - 04-03-2021 (03-03-2021, 08:39 PM)Narmeen Wrote: Hello Hi I guess you can raycast against the cloths using the ObiParticlePicker script attached to the gameobjects controlled by the quest joysticks. That script will pickup the closest particle of the cloth and you wll be able the "hold" your model. RE: Obi cloth for VR grab - josemendez - 04-03-2021 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/tutorials/scriptingcollisions.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/thread-2422.html I recommend you read on collision callbacks, particle and constraint scripting: http://obi.virtualmethodstudio.com/tutorials/scriptingcollisions.html http://obi.virtualmethodstudio.com/tutorials/scriptingparticles.html http://obi.virtualmethodstudio.com/tutorials/scriptingconstraints.html RE: Obi cloth for VR grab - Narmeen - 04-03-2021 (04-03-2021, 08:35 AM)josemendez Wrote: Hi there! RE: Obi cloth for VR grab - JhonatasFarias - 04-03-2021 (04-03-2021, 08:35 AM)josemendez Wrote: Hi there! Good to know! I'm keeping this threat for future consulting in case I want porting my game for VR. |