22-02-2018, 07:50 PM
(22-02-2018, 08:58 AM)josemendez Wrote: last particle addIndex should be obiRope.UsedParticles-1. Arrays run from 0 to size-1
cheers!
Hi josemendez,
I did what you told me to do. It's now obiRope.UsedParticles-1. As you can see in this video, it works perfect for 6 particles (as Rope Length). But less than 6 particles, the rope behaves different which i couldn't understand. And for greater than 6 particles, it behaves exact same as 7 particles rope. I'm going out of my mind, help please
P.S. I have a prefab which contains the obiRope, WhiteSphere and the BlackSphere. As in prefab, spheres are pinned to the ends of the rope. And I have a script called MovePin. So the moving spheres with mouse, changing rope length due to distance between two spheres, changing rope UV scale and snapping rope ends to the block stuffs are made in MovePin script. And i have the script on both of spheres and each one works for itself. Maybe knowing that could help you figure out what's the problem.
Thanks in advance!