Obi Official Forum
Softbody to joints at runtime - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html)
+--- Thread: Softbody to joints at runtime (/thread-905.html)



Softbody to joints at runtime - Richard - 15-02-2019

Hello. I would like to make tutorial human, but applied obi softbody to only joints of arms and legs. Can I do that in one mesh(without dividing body parts) at runtime on script?


RE: Softbody to joints at runtime - josemendez - 09-04-2019

(15-02-2019, 02:34 AM)Richard Wrote: Hello. I would like to make tutorial human, but applied obi softbody to only joints of arms and legs. Can I do that in one mesh(without dividing body parts) at runtime on script?

Yes, but you need to somehow identify which vertices /particle of your mesh are part of the arms or legs.

How to do this is completely up to you. You could use vertex colors as IDs, a special texture, or even threshold by distance to a certain collider. Once you know which particles should be left out of the simulation, simply set their inverse masses to 0 and call softbody.Optimize().