Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi cloth for VR grab
#1
Hello 

How can I grab obi cloth in VR for the oculus quest integration?

any advice please
Reply
#2
(03-03-2021, 08:39 PM)Narmeen Wrote: Hello 

How can I grab obi cloth in VR for the oculus quest integration?

any advice please

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.
Reply
#3
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
Reply
#4
(04-03-2021, 08:35 AM)josemendez Wrote: Hi there!
Okay thank you  i will try that 


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
Reply
#5
(04-03-2021, 08:35 AM)josemendez Wrote: 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


Good to know! I'm keeping this threat for future consulting in case I want porting my game for VR.
Reply