27-01-2022, 01:40 PM
(27-01-2022, 11:21 AM)josemendez Wrote: Hi,
You can change individual particle radii using the particle API:
http://obi.virtualmethodstudio.com/manua...icles.html
Do this using a sine wave, and displace the sine wave along the rope to get the bumps moving. Like this:
Code:// accumulate time on a member variable:
time += Time.deltaTime * speed;
for (int i = 0; i < rope.solverIndices.Length; ++i)
{
int solverIndex = rope.solverIndices[i]:
rope.principalRadii[solverIndex] = Vector3.one * (baseThickness + Mathf.Max(0,Mathf.Sin(i + time)*bumpThickness));
}
Should be pretty easy to do.
let me know if you need help!
Hi, thank you so much josemendez this is working !
But there are some problems here I guess. When the rope streching,
swelling is streching also. Here is the video of problem: