Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi Rope Pipe Water Flow Effect
#2
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!
Reply


Messages In This Thread
Obi Rope Pipe Water Flow Effect - by NorkQ - 27-01-2022, 11:16 AM
RE: Obi Rope Pipe Water Flow Effect - by josemendez - 27-01-2022, 11:21 AM
RE: Obi Rope Pipe Water Flow Effect - by NorkQ - 27-01-2022, 01:40 PM
RE: Obi Rope Pipe Water Flow Effect - by NorkQ - 27-01-2022, 02:08 PM
RE: Obi Rope Pipe Water Flow Effect - by NorkQ - 27-01-2022, 04:57 PM