Skip to main content
added 1095 characters in body; added 14 characters in body; added 6 characters in body; added 15 characters in body
Source Link
Jon
  • 544
  • 2
  • 9

So I believe the problem here is an interesting form of the age old mass-ratio constraint problem. I’ll explain the high level.

The why:

So Unity’s default MLCP solver is commonly referred to as PGS for short. In this (and any) physics solver, a constraint between two objects uses the mass and inertia tensor (referred to as mass properties) of both objects as inputs to determine the impulse required to move both objects such that the constraint’s conditions are satisfied.

In the case of the constraints you’re using, the condition they are satisfying is a fixed distance between the two objects, meaning that the solver will apply corrective impulses every frame, on every constraint, for a set amount of iterations. The amount of iterations the solver uses to attempt to converge on a solution is just an estimate, which means that there can be situations in which the constraint will diverge, especially if a large mass is being carried by a series of smaller masses (i.e. wrecking ball on a chain). The constraints between the smaller masses have no knowledge of the larger mass way at the end of the chain, so they cannot adequately compensate for the effective mass of the large object on the end. I believe a similar situation is occurring here.

ITL;DR I believe that the mass of your new child object is not accounted for by the constraints which bind the parent object to the rest of the body, making those constraints unable to converge on a solution. If that is the case, I think there are a few ways to fix this. First, being to disable physics on the child object while it is parented. If not that, you could try making the mass of the child extremely small and removing linear drag from the child as well. It may take a bit parameter tuning and testing to achieve an acceptable solution, and this is a very common practice.

That’s my best guess from the limited information in the question

Edit: Other tests/solutions could include parenting the child object to the leading object in this chain. If this fixes the problem, then I would consider my theory correct. Another route would be to try significantly raising the masses of every object in the chain such that the mass of the new child object is negligible in comparison to any segment, though, this may introduce other undesirable behavior as the entire object would have significantly more momentum.

Another similar (albeit far less likely) theory to explain your problem would be that the engine decided to recalculate the polyhedral mass properties when the child was parented to your object, including mass, center of mass and inertia tensor. That would effectively make that segment a compound collider. The shift in center of mass plus the mass ratio problem could explain the behavior. This would be a bit more difficult to fix and diagnose, though. If that was the case, you may need to manually modify those mass properties when parenting and unparenting so that it appears to the physics engine as if nothing has changed.

So I believe the problem here is an interesting form of the age old mass-ratio constraint problem. I’ll explain the high level.

So Unity’s default MLCP solver is commonly referred to as PGS for short. In this (and any) physics solver, a constraint between two objects uses the mass and inertia tensor (referred to as mass properties) of both objects as inputs to determine the impulse required to move both objects such that the constraint’s conditions are satisfied.

In the case of the constraints you’re using, the condition they are satisfying is a fixed distance between the two objects, meaning that the solver will apply corrective impulses every frame, on every constraint, for a set amount of iterations. The amount of iterations the solver uses to attempt to converge on a solution is just an estimate, which means that there can be situations in which the constraint will diverge, especially if a large mass is being carried by a series of smaller masses (i.e. wrecking ball on a chain). The constraints between the smaller masses have no knowledge of the larger mass way at the end of the chain, so they cannot adequately compensate for the effective mass of the large object on the end. I believe a similar situation is occurring here.

I believe that the mass of your new child object is not accounted for by the constraints which bind the parent object to the rest of the body, making those constraints unable to converge on a solution. If that is the case, I think there are a few ways to fix this. First, being to disable physics on the child object while it is parented. If not that, you could try making the mass of the child extremely small and removing linear drag from the child as well. It may take a bit parameter tuning and testing to achieve an acceptable solution, and this is a very common practice.

That’s my best guess from the limited information in the question

So I believe the problem here is an interesting form of the age old mass-ratio constraint problem. I’ll explain the high level.

The why:

So Unity’s default MLCP solver is commonly referred to as PGS for short. In this (and any) physics solver, a constraint between two objects uses the mass and inertia tensor (referred to as mass properties) of both objects as inputs to determine the impulse required to move both objects such that the constraint’s conditions are satisfied.

In the case of the constraints you’re using, the condition they are satisfying is a fixed distance between the two objects, meaning that the solver will apply corrective impulses every frame, on every constraint, for a set amount of iterations. The amount of iterations the solver uses to attempt to converge on a solution is just an estimate, which means that there can be situations in which the constraint will diverge, especially if a large mass is being carried by a series of smaller masses (i.e. wrecking ball on a chain). The constraints between the smaller masses have no knowledge of the larger mass way at the end of the chain, so they cannot adequately compensate for the effective mass of the large object on the end. I believe a similar situation is occurring here.

TL;DR I believe that the mass of your new child object is not accounted for by the constraints which bind the parent object to the rest of the body, making those constraints unable to converge on a solution. If that is the case, I think there are a few ways to fix this. First, being to disable physics on the child object while it is parented. If not that, you could try making the mass of the child extremely small and removing linear drag from the child as well. It may take a bit parameter tuning and testing to achieve an acceptable solution, and this is a very common practice.

That’s my best guess from the limited information in the question

Edit: Other tests/solutions could include parenting the child object to the leading object in this chain. If this fixes the problem, then I would consider my theory correct. Another route would be to try significantly raising the masses of every object in the chain such that the mass of the new child object is negligible in comparison to any segment, though, this may introduce other undesirable behavior as the entire object would have significantly more momentum.

Another similar (albeit far less likely) theory to explain your problem would be that the engine decided to recalculate the polyhedral mass properties when the child was parented to your object, including mass, center of mass and inertia tensor. That would effectively make that segment a compound collider. The shift in center of mass plus the mass ratio problem could explain the behavior. This would be a bit more difficult to fix and diagnose, though. If that was the case, you may need to manually modify those mass properties when parenting and unparenting so that it appears to the physics engine as if nothing has changed.

added 117 characters in body
Source Link
Jon
  • 544
  • 2
  • 9

So I believe the problem here is an interesting form of the age old mass-ratio constraint problem. I’ll explain the high level.

So Unity’s default MLCP solver is commonly referred to as PGS for short. In this (and any) physics solver, a constraint between two objects uses the mass and inertia tensor (referred to as mass properties) of both objects as inputs to determine the impulse required to move both objects such that the constraint’s conditions are satisfied.

In the case of the constraints you’re using, the condition they are satisfying is a fixed distance between the two objects, meaning that the solver will apply corrective impulses every frame, on every constraint, for a set amount of iterations. The amount of iterations the solver uses to attempt to converge on a solution is just an estimate, which means that there can be situations in which the constraint will diverge, especially if a large mass is being carried by a series of smaller masses (i.e. wrecking ball on a chain). The constraints between the smaller masses have no knowledge of the larger mass way at the end of the chain, so they cannot adequately compensate for the effective mass of the large object on the end. I believe a similar situation is occurring here.

I believe that the mass of your new child object is not accounted for by the constraints which bind the parent object to the rest of the body, making those constraints unable to converge on a solution. If that is the case, I think there are a few ways to fix this. First, being to disable physics on the child object while it is parented. If not that, you could try making the mass of the child extremely small and removing linear drag from the child as well. It may take a bit parameter tuning and testing to achieve an acceptable solution, and this is a very common practice.

That’s my best guess from the limited information in the question

So I believe the problem here is an interesting form of the age old mass-ratio constraint problem. I’ll explain the high level.

So Unity’s default MLCP solver is commonly referred to as PGS for short. In this (and any) physics solver, a constraint between two objects uses the mass and inertia tensor (referred to as mass properties) of both objects as inputs to determine the impulse required to move both objects such that the constraint’s conditions are satisfied.

In the case of the constraints you’re using, the condition they are satisfying is a fixed distance between the two objects, meaning that the solver will apply corrective impulses every frame, on every constraint, for a set amount of iterations. The amount of iterations the solver uses to attempt to converge on a solution is just an estimate, which means that there can be situations in which the constraint will diverge, especially if a large mass is being carried by a series of smaller masses (i.e. wrecking ball on a chain). The constraints between the smaller masses have no knowledge of the larger mass way at the end of the chain, so they cannot adequately compensate for the effective mass of the large object on the end. I believe a similar situation is occurring here.

I believe that the mass of your new child object is not accounted for by the constraints which bind the parent object to the rest of the body, making those constraints unable to converge on a solution. If that is the case, I think there are a few ways to fix this. First, being to disable physics on the child object while it is parented. If not that, you could try making the mass of the child extremely small and removing linear drag from the child as well.

That’s my best guess from the limited information in the question

So I believe the problem here is an interesting form of the age old mass-ratio constraint problem. I’ll explain the high level.

So Unity’s default MLCP solver is commonly referred to as PGS for short. In this (and any) physics solver, a constraint between two objects uses the mass and inertia tensor (referred to as mass properties) of both objects as inputs to determine the impulse required to move both objects such that the constraint’s conditions are satisfied.

In the case of the constraints you’re using, the condition they are satisfying is a fixed distance between the two objects, meaning that the solver will apply corrective impulses every frame, on every constraint, for a set amount of iterations. The amount of iterations the solver uses to attempt to converge on a solution is just an estimate, which means that there can be situations in which the constraint will diverge, especially if a large mass is being carried by a series of smaller masses (i.e. wrecking ball on a chain). The constraints between the smaller masses have no knowledge of the larger mass way at the end of the chain, so they cannot adequately compensate for the effective mass of the large object on the end. I believe a similar situation is occurring here.

I believe that the mass of your new child object is not accounted for by the constraints which bind the parent object to the rest of the body, making those constraints unable to converge on a solution. If that is the case, I think there are a few ways to fix this. First, being to disable physics on the child object while it is parented. If not that, you could try making the mass of the child extremely small and removing linear drag from the child as well. It may take a bit parameter tuning and testing to achieve an acceptable solution, and this is a very common practice.

That’s my best guess from the limited information in the question

Source Link
Jon
  • 544
  • 2
  • 9

So I believe the problem here is an interesting form of the age old mass-ratio constraint problem. I’ll explain the high level.

So Unity’s default MLCP solver is commonly referred to as PGS for short. In this (and any) physics solver, a constraint between two objects uses the mass and inertia tensor (referred to as mass properties) of both objects as inputs to determine the impulse required to move both objects such that the constraint’s conditions are satisfied.

In the case of the constraints you’re using, the condition they are satisfying is a fixed distance between the two objects, meaning that the solver will apply corrective impulses every frame, on every constraint, for a set amount of iterations. The amount of iterations the solver uses to attempt to converge on a solution is just an estimate, which means that there can be situations in which the constraint will diverge, especially if a large mass is being carried by a series of smaller masses (i.e. wrecking ball on a chain). The constraints between the smaller masses have no knowledge of the larger mass way at the end of the chain, so they cannot adequately compensate for the effective mass of the large object on the end. I believe a similar situation is occurring here.

I believe that the mass of your new child object is not accounted for by the constraints which bind the parent object to the rest of the body, making those constraints unable to converge on a solution. If that is the case, I think there are a few ways to fix this. First, being to disable physics on the child object while it is parented. If not that, you could try making the mass of the child extremely small and removing linear drag from the child as well.

That’s my best guess from the limited information in the question