21-04-2022, 02:41 PM
(This post was last modified: 21-04-2022, 03:15 PM by josemendez.)
(21-04-2022, 02:21 PM)Cysar Wrote: I do not understand that, 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,