I’m stuck in 2023.1.20 I don’t know what changed but my airplane game is heavily physics-based as you may guess and anything after that version creates all kinds of weird crap. I saw this bug reported over a month ago as a “known issue” but there is no fix yet. I hope we don’t have to wait until 2024 to get this resolved because it’s a serious bug.
It’s a tricky case, and we’re looking into what in that PhysX update exactly triggered the observed difference. So far we’ve ruled out custom tensors, the issue will present itself even without them as long as we have certain ConfigurableJoints and AddForce. That’s all I have at the moment.
If it helps, to me it began happening on 2023.1.21.
2023.1.20 seems ok. So it has to be a change between 20 and 21.
I use AddForce and AddTorque in my game. My airplane flies straight at high speed in 2023.1.20, but when I move to .21, the airplane begins to fall and it is hard to maneuver as if the gravity vector is stronger or the inertia is messed up.
@MelvMay @yant we are experiencing physics issues after updating to 2022.3.8, is this when PhysX was updated to 4.1.2? I posted something about it in another thread…
I thought I would mention this here as I don’t think configurable joints were the only part of Unity’s physics that was negatively affected by the PhysX update. I did try to reproduce our issue in a simple project but haven’t had any luck…
I am continuing to test. I could submit our actual project as a bug report but I would rather not.
any updates on this?
It seems that PhysX was updated to 4.1.2 in 2022.1: https://blog.unity.com/engine-platform/expanding-the-robotics-toolbox-physics-changes-in-unity-20221
“The PhysX version was updated to 4.1.2, the latest in the 4.x line to date.”
oh boy, months and still not solved
Hello!
Sorry for not coming to you sooner, things were happening rather turbulently lately.
So looking into this particular case under a magnifying lens, it turns out that in the PhysX 4.1.2 they improved the TGS solver so that it doesn’t loose that much energy as it used before. For that, it appears to be a change, but it’s not a breakage, it’s an improvement actually. It only seems to affect the TGS solver mode. Let me illustrate.
Consider a cube on a spring joint like this one:
Assume there is no damping:
It appears that with the PGS solver, in both of the PhysX versions the cube’s trajectory decays even without any damping at all (damping inherent to the solver’s projections). Here is the first 10 seconds of the capture:
However, with TGS there is some difference, as in the new PhysX 4.1.2 version TGS no longer decays that fast at all (the joint might appear weaker due to that?).
If we were to repeat the same experiment with a spring joint that has some damping, here are the graphs we’d get.
Again, in PhysX 4.1.1 there is no difference between PGS and TGS – they both get the same trajectory:
In addition to that, PGS results in the same trajectories comparing 4.1.1 and 4.1.2. However, in 4.1.2 there is a difference between PGS and TGS.
Hope that makes some sense now.
Anthony
What is being graphed here? Velocity? Is there zero drag on the rigidbody?
Position along Y.
i don’t think that explains why gravity seems to pull objects differently. I also have no idea what’s TGS and PGS. Where do i pick one or the other?
You choose between PGS and TGS in the physics settings, check out the solver type drop down: Unity - Manual: Physics.
Why do you say that you don’t think that explains what happens? It’s not exactly about the gravity or the complicated recoil logic as in the original report. It’s pretty much about the behaviour of soft constraints - such as the ones used in the SprintJoint (it’s just one of the simplest to use forms, but pretty much the same thing powers ConfigurableJoint and others). The way those constraints manifest their behaviour is via the impulses that the solver calculates in order to maintain the constraint. Clearly, different solvers will give different results. We show it with cube under gravity because it’s clear that in nature there won’t be any decay in this conditions under no drag and no damping.
Hey @yant ,
Thanks for looking into this. I can confirm that 2021 TGS → 2022 PGS is similar enough that we can likely make it work. Is there a formula to calculating the amount of damping needed to get identical results from 2021 TGS → 2022 TGS? Or is there other values I can change to go from 2021 TGS → 2022 TGS?
Thanks again,
Colton
I’m afraid that I don’t really have a formula to share at this stage, unfortunately.
Well, my settings are in PGS, and my airplanes are falling and behaving completely differently as soon as I switch from 2023.1.19 to anything above that version. That’s why I say I don’t think it is related. If i understood correctly, your post said PGS did not change.
OK, I can’t argue with that. It could very well be a totally unrelated problem. Do you have your project uploaded? Do you have a case#?
I’m not quite sure if this is related to this issue, but I can’t seem to keep consistent behaviour on a Rigidbody when changing colliders, even with the same Inertia Tensor settings. I’m using Unity 2022.3.41f1. Please see this video: https://drive.google.com/file/d/15ZpXLjAvukNDL7iYVjiNho8URvq3NkLG/view?usp=sharing
I suppose what I’m trying to figure out is how do I have consistent behaviours on Rigidbodies regardless of it’s collider setup. My assumption is that it’s related to the same problem.