17-12-2020, 08:50 AM
Hi,
I am trying to simulate cloth manipulation in Unity 2019.6.16 and Obi Cloth 5.
Currently, I am attaching a sphere to a particle group on the cloth and have written a script allowing me to control the sphere with my mouse (images below).
I want to be able to grasp (click) anywhere on the cloth and manipulate it, and I know there is a better way than creating a few hundred spheres and attaching them individually to each particle in the cloth.
My issue is that I am fairly new to Unity and Obi Cloth, and I am totally stuck on how to script this type of interaction. Specifically, I am not quite sure where to start, should I be modifying the "ObiParticleAttachment.cs" associated with the cloth, or should I create a new .cs file? If I create a new .cs file then how do I access/reference my cloth and its "Obi Particle Attachment" component?
Thanks,
Ben
I am trying to simulate cloth manipulation in Unity 2019.6.16 and Obi Cloth 5.
Currently, I am attaching a sphere to a particle group on the cloth and have written a script allowing me to control the sphere with my mouse (images below).
I want to be able to grasp (click) anywhere on the cloth and manipulate it, and I know there is a better way than creating a few hundred spheres and attaching them individually to each particle in the cloth.
My issue is that I am fairly new to Unity and Obi Cloth, and I am totally stuck on how to script this type of interaction. Specifically, I am not quite sure where to start, should I be modifying the "ObiParticleAttachment.cs" associated with the cloth, or should I create a new .cs file? If I create a new .cs file then how do I access/reference my cloth and its "Obi Particle Attachment" component?
Thanks,
Ben