Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Feedback Cloth jumps when 'Pausing'
#1
Hi there,



When pausing our game (we set our timeScale to 0) and reset it back to 1 when we unpause. We seem to have an issue where the cloth receives impulse and ends up jumping every time we pause and unpause our game.



I've attached a video where the main character's gown ends up jumping up. I'm wondering where I can take a look to start debugging this issue with ObiCloth?

Video of the cloth physics jumping up


Best,

Porrith
Reply
#2
(08-02-2023, 11:09 PM)initialPrefabs Wrote: Hi there,



When pausing our game (we set our timeScale to 0) and reset it back to 1 when we unpause. We seem to have an issue where the cloth receives impulse and ends up jumping every time we pause and unpause our game.



I've attached a video where the main character's gown ends up jumping up. I'm wondering where I can take a look to start debugging this issue with ObiCloth?

Video of the cloth physics jumping up


Best,

Porrith

Hi Porrith,

Tested this on a character cloth setup (setting timescale to 0, then back to 1 to unpause) but couldn't reproduce this ourselves.

My guess (bit of a shot in the dark) is that there's some constraint the particles are violating while the game is paused (collision or skin constraints are most probable culprits) and since the simulation is not advanced while timescale is set to 0, when unpausing the game the particles are instantly forced to meet the constraint causing them to jump.

If using them, try disabling your skin constraints and see if this improves. If it does, look if there's any chance the character animation might be running while the game is paused (for instance, if your animator update mode is set to "unscaled time").

kind regards,
Reply
#3
(09-02-2023, 08:24 AM)josemendez Wrote: Hi Porrith,

Tested this on a character cloth setup (setting timescale to 0, then back to 1 to unpause) but couldn't reproduce this ourselves.

My guess (bit of a shot in the dark) is that there's some constraint the particles are violating while the game is paused (collision or skin constraints are most probable culprits) and since the simulation is not advanced while timescale is set to 0, when unpausing the game the particles are instantly forced to meet the constraint causing them to jump.

If using them, try disabling your skin constraints and see if this improves. If it does, look if there's any chance the character animation might be running while the game is paused (for instance, if your animator update mode is set to "unscaled time").

kind regards,

Okay - so I  tried testing with setting the timeScale to 0 and then back to 1 to unpause also (via the Editor) and couldn't replicate it either with the same character.
I also took a look at the animator too and it is currently set to
- Update Mode: Animate Physics
- Culling Mode: Animate Always

I tried different variations of those animator settings and it doesn't seem to fix the cloth jumping issue either. I'll try messing with the cloth constraints to see if I can solve this.

(09-02-2023, 07:05 PM)initialPrefabs Wrote: Okay - so I  tried testing with setting the timeScale to 0 and then back to 1 to unpause also (via the Editor) and couldn't replicate it either with the same character.
I also took a look at the animator too and it is currently set to
- Update Mode: Animate Physics
- Culling Mode: Animate Always

I tried different variations of those animator settings and it doesn't seem to fix the cloth jumping issue either. I'll try messing with the cloth constraints to see if I can solve this.
Okay so it looks like fixedDeltaTime was set to 0 right before pausing which was causing the physics to evaluate multiple times per frame before we pause. Looks like the issue is resolved on my side!
Reply
#4
(09-02-2023, 07:05 PM)initialPrefabs Wrote: Okay so it looks like fixedDeltaTime was set to 0 right before pausing which was causing the physics to evaluate multiple times per frame before we pause. Looks like the issue is resolved on my side!

Hi Porrith,

Glad to hear! let me know if you need further help and best you with your project Sonrisa

kind regards
Reply