27-01-2022, 11:21 AM
(This post was last modified: 27-01-2022, 11:24 AM by josemendez.)
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:
Should be pretty easy to do.
let me know if you need help!
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!