Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Flipping cloth? ScaleX == -1?
#8
(22-08-2019, 06:13 PM)cubrman Wrote: Listen, I've just inserted the flipping code into ObiSolver.SimmulateStep(). It flips a GameObject into normal position just before the simulation and then flipps it back again at the end of the method. This did not help. And I am not talking about inverted normals - if they were the only issue, I would have flipped them in the shader by now - the problem is that the cloth kinda starts ignoring the colliders when flipped, even when I added the pre-flipping code. So I have a simple question: can I somehow ensure that the cloth can see the colliders (e.g. simmulate exactly like for the non-flipped cloth)? I have a very strong feeling that your suggestion to insert the flipping code into WaitForFixedUpdate() (meaning into the SimmulateStep()) was not the right one and you are omitting something. I have a strong suspission that I need to do something else to ensure that my GameObject is not flipped before the simulation, maybe change some variable? Btw, the Solver is sitting on a GameObject that itself gets flipped, maybe I should move it up the hierarchy so that it does not get flipped?

Hi,

Well, if you perform flipping every frame in WaitForFixedUpdate(), your mesh is not flipped before the simulation. WaitForFixedUpdate happens right after all objects have had all FixedUpdate() calls executed, so by then simulation is done.

Keep in mind that most colliders do not support negative scaling. This is because there must be a consistent inside/outside for collisions to be efficient. So if you're flipping your character colliders you must do so together with the cloth mesh.
Reply


Messages In This Thread
Flipping cloth? ScaleX == -1? - by cubrman - 13-08-2019, 05:29 PM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 14-08-2019, 09:10 AM
RE: Flipping cloth? ScaleX == -1? - by cubrman - 14-08-2019, 11:11 AM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 14-08-2019, 12:19 PM
RE: Flipping cloth? ScaleX == -1? - by cubrman - 14-08-2019, 04:48 PM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 14-08-2019, 05:30 PM
RE: Flipping cloth? ScaleX == -1? - by cubrman - 22-08-2019, 06:13 PM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 23-08-2019, 07:17 AM
RE: Flipping cloth? ScaleX == -1? - by cubrman - 23-08-2019, 10:03 AM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 23-08-2019, 10:05 AM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 23-08-2019, 10:35 AM
RE: Flipping cloth? ScaleX == -1? - by cubrman - 23-08-2019, 12:10 PM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 23-08-2019, 01:06 PM