20-11-2021, 10:08 PM
(This post was last modified: 20-11-2021, 10:21 PM by josemendez.)
(20-11-2021, 09:13 PM)beegon Wrote: Is there a simple way to manually attach a game object to a softbody? I just want an object to follow a point or particle on the softbody without influencing the softbody at all, as if the game object were just along for the ride.
I tried the attachment component with both static and dynamic options. Neither give me good results since static will not allow the object to be influenced by the softbody and dynamic causes some wonky and unpredictable 2 way interaction. I noticed some threads here where colliding objects can attach to a softbody at runtime, but I want to set this up manually in edit mode so the game object is always on a specific part of the softbody from the get go. I also tried the obi contact grabber, but that doesn't seem to do anything.
I am not a programmer so I have no idea how to script something like this myself. Any help would be much appreciated!
Hi!
Attachments are designed to attach softbodies to other objects, if using a dynamic attachment doesnt do what you need (it should, as it enables two way coupling with rigidbodies) you have two other options: a) use a ObiSoftbodySkinner to bind the object to the softbody (it will deform along with it ) or b) write some code in case you want the object to keep its original shape. All you need to do is pick the closest softbody particle, then copy its position/orientation to the object. This is done using the particles API, see:
http://obi.virtualmethodstudio.com/manua...icles.html
Should be fairly easy, but if you’ve never written code before it may be a challenge. Obi is not really targeted at beginners, it’s an advanced physics engine and advertised as such. To be able to use Obi you need to have basic/intermediate coding skills, as explained in our FAQ:
http://obi.virtualmethodstudio.com/faq.html
On Monday I will write some sample code for you if you need.
Kind regards,