Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Stick" rigidbodies to softbody
#6
Objects have both orientation and position, and softbody particles do as well.

If you only store the position, when a particle rotates around any spheres attached to it will not, and they will end up inside the softbody.

What you want is to build a transform matrix using both the position and the orientation (using GetParticleOrientation()), to find your sphere's position in the particle's local space. You need to know what vector spaces are, how to build a basis matrix and convert data between spaces, as this is a basic 3D skill.

You can use Unity's Matrix4x4.TRS() to build a matrix out of a position and orientation.

cheers!
Reply


Messages In This Thread
"Stick" rigidbodies to softbody - by Spectra_7 - 07-05-2021, 10:08 AM
RE: "Stick" rigidbodies to softbody - by josemendez - 07-05-2021, 01:42 PM