Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mass and Center of Mass? Missing API?
#1
Pregunta 
Has the API Docs been updated for softbody? I may be overlooking it or using an outdated link.

Before I write my own methods, I have a few questions:

I'm replacing my rigidbody with a softbody. Do these methods/fields or something equivalent exist for softbodies.

  1. Rigidbody.GetPointVelocity(Vector3 worldPoint) - returns the pointVelocity .
  2. Rigidbody.AddForceAtPosition(Vector3 force, Vector3 position)
  3. Rigibody.centerOfMass - get and set the center of mass of softbody.
  4. Rigibody.mass - [i]get and set the total mass of softbody.[/i]
  5. Rigibody.velocity - gets the softbody velocity 
I have been working on alternative approaches just in case the above methods/fields don't exist. so far...
for setting mass: I was going to divide the total mass with the particle count and add that value to each particle.
for getting velocity: since each particle has a velocity, I was going to use the first particle as the velocity.
 but does a single particle velocity represent the velocity of the entire softbody? Not sure this will work.


And Lastly - Since you have to initialize a softbody in the editor, It's not possible to create a softbody at runtime, right?

I'm in the dark and guessing without the softbody API documentation (using the source helps, but creates more questions).

 Any help would be greatly appreciated.

Thanks.
Reply


Messages In This Thread
Mass and Center of Mass? Missing API? - by StudioTatsu - 25-03-2019, 10:09 PM