Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  move each particle of cloth
#4
(19-02-2019, 09:26 AM)Richard Wrote: I cannot image how to do. What if I move some of particles to X axis and then Z axis?

Hi,

Particle positions use the standard Unity Vector4 datatype. So to set the X value and the Z value, you simply pass them to the constructor as you normally would.

Code:
solver.positions[index] = new Vector4(x,y,z,0);

Please refer to Unity's documentation for more info how to use the Vector4 class.
Reply


Messages In This Thread
move each particle of cloth - by Richard - 18-02-2019, 03:22 PM
RE: move each particle of cloth - by josemendez - 19-02-2019, 09:10 AM
RE: move each particle of cloth - by Richard - 19-02-2019, 09:26 AM
RE: move each particle of cloth - by josemendez - 19-02-2019, 11:48 AM
RE: move each particle of cloth - by Richard - 19-02-2019, 12:42 PM