Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Turning cloth object into a perfect static rectangle
#3
Quote:josemendez
What do you mean exactly by a "regular" rectangle shape? A simple static mesh? 

Not exactly. I want to disable the simulation entirely and return the mesh back to its original shape, the shape it had before the simulation have started.


Quote:josemendez
You can't convert an object into some other type magically (this applies to programming in general). Best you can do if both types have the same size in memory, is reinterpret that memory.


More specifically, components in Unity cannot be "converted" into one another. A cloth component is a cloth component, very much like a rigidbody is a rigidbody. You can't turn a rigidbody into cloth, or a cloth into a static mesh, except by destroying one and creating the other. So you can't "turn" an object into a different object: you destroy the old one and instantiate the new one.




Yes, I am aware of this. I wondered if I could make the actor so stiff using the obi cloth parameters that it almost resembled a static, straight, primitive rectangle. Seems like I will have to move predefined groups into desired positions and then instantiate a primitive rectangle in the position, and then destroy the actor.

Thanks for the quick reply tho!  Corazón
Reply


Messages In This Thread
RE: Turning cloth object into a perfect static rectangle - by KaanOzcelik - 17-06-2022, 11:42 AM