Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move Softbody to position
#4
(20-04-2022, 07:10 PM)Cysar Wrote: I tested the 3 scripts from the documentation, everything works, but I don't know what to do with it...

[Image: 55deaf66603ba9c40b6e84b8d2669903.gif]

There's several ways you could go about this. One is to specify particle positions, but that would overwrite simulation results. Assuming you want the softbody to still react to collisions and accelerations while following the red ball, the simplest approach is to use the softbody.AddForce() function. This works just like Unity's rigidbody.AddForce().

Calculate a vector from the softbody to the red sphere, scale it by the intensity of the force you want to apply, and then call AddForce(yourScaledForceVector). That will make the softbody follow the sphere.

Let me know if I can be of further help,
Reply


Messages In This Thread
Move Softbody to position - by Cysar - 20-04-2022, 06:28 PM
RE: Move Softbody to position - by josemendez - 20-04-2022, 06:37 PM
RE: Move Softbody to position - by Cysar - 20-04-2022, 07:10 PM
RE: Move Softbody to position - by josemendez - 21-04-2022, 10:40 AM
RE: Move Softbody to position - by Cysar - 21-04-2022, 11:36 AM
RE: Move Softbody to position - by josemendez - 21-04-2022, 12:09 PM
RE: Move Softbody to position - by Cysar - 21-04-2022, 02:21 PM
RE: Move Softbody to position - by josemendez - 21-04-2022, 02:41 PM
RE: Move Softbody to position - by Cysar - 21-04-2022, 02:51 PM