Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move Softbody to position
#8
(21-04-2022, 02:21 PM)Cysar Wrote: I do not understand that Indeciso , so I just googled "unity velocity Damped Oscillations" and I found this (A simple follow script using damped harmonic motion : Unity3D (reddit.com)
The problem is this is working when I use rigidbody.velocity = velocity but its not wokring when I try to use rigidbody.AddForce(velocity) is it possible to use something like ObiActor.velocity instead of ObiActor.AddForce() ?

This won't work because softbodies don't have a single velocity value, unlike rigidbodies.

The linear velocity of a rigidbody is that of its center of mass, since all points in it move in unison: it cannot deform, it's "rigid". A softbody however doesn't have a single velocity value. Each individual particle can move in a different direction at a different speed. You need to modify the velocity of each individual particle.

The manual explains how to set particle velocities (or any other per-particle property): http://obi.virtualmethodstudio.com/manua...icles.html

Let me know if you need some sample code.

kind regards,
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