Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it able to move softbody with script?
#10
(14-11-2019, 10:24 AM)manurocker95 Wrote: About 1) gonna try that, but more examples should be added to the package to cover these kind of things.

2) Not really: https://gofile.io/?c=mbKTnQ

the script just set the positions as:     

solver.positions[pickArgs.particleIndex] = (targetPosition);

Hi Manu,

The video you sent causes VLC, Quicktime and Media Player to crash, so I'm unable to see it.

When setting positions directly you also need to set the inverse mass and the velocity of these particles to zero, as I pointed out before. Setting the inverse mass to zero deactivates dynamics for that particle (as you will be setting its position directly, and you don't want the simulation to overwrite it), and removing all its velocity will make sure it doesn't drift away from the position you set.

Once you "release" the particle, simply set its inverse mass to whatever it was. The simulation will take over and begin setting both its position and velocity.

From the manual:
http://obi.virtualmethodstudio.com/tutor...icles.html
Quote:Inverse mass for each particle. An inverse mass of 0 means the particle's mass is infinite, so its position will be unaffected by dynamics (allowing you to override it manually).
Reply


Messages In This Thread
RE: Is it able to move softbody with script? - by josemendez - 14-11-2019, 10:39 AM