Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving an ObiCloth GameObject by code
#1
It seems like we can't have movement on an ObiCloth GameObject by Unity code. I have tried to use GO.transform.position but it just move its collider not its ObiCloth component. Are there any way to make an Obi object to move?
Reply
#2
(15-08-2017, 03:04 PM)matchalover Wrote: It seems like we can't have movement on an ObiCloth GameObject by Unity code. I have tried to use GO.transform.position but it just move its collider not its ObiCloth component. Are there any way to make an Obi object to move?

Fixed particles obey the transform, unfixed particles obey the simulation. So if your cloth has no particles fixed, it will just follow the simulation. Fix a few particles in your cloth using the particle editor and they will follow your cloth's transform.

Edit: Also note that for a cloth with no particles fixed (all of them moving freely), the notion of whole object "transform" doesn´t make sense: the cloth can bend, stretch, compress... what are its "position", "rotation" and "scale"? There's no obvious "center" to define its position, no orientation or scale for a deformable object.
Reply