Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Make the rope float
#1
Hi
I'm using your rope as a fishing line. I need the rope to float on the water.
The water asset uses a rigid body to make objects float.
If you have an idea to help, I will be grateful.

I have an idea how this can be done.To do this, I must get the location of particles in world space. And then check if they are in the water, then move them in the right direction or use force on them. Is it possible to do that? If yes, then how?

I am using KWS Water System.
https://assetstore.unity.com/packages/to...ing-205007
Reply
#2
(24-10-2022, 12:14 AM)Slava Wrote: I have an idea how this can be done.To do this, I must get the location of particles in world space. And then check if they are in the water, then move them in the right direction or use force on them. Is it possible to do that? If yes, then how?

Hi,

Yes, that's the right approach. You can get/set any per-particle property using the particles API:
http://obi.virtualmethodstudio.com/manua...icles.html

If you want  to apply forces to particles, write into the solver's externalForces array. If you want to apply accelerations, use the solver's velocities array instead. Note all properties are expressed in the solver's local space, you will need to convert to/from world space using the methods defined in Unity's transform class.

kind regards,
Reply