- Home /
Hinges break at certain angles
I think I've found a bug with the physics engine.
Setup:
I've a rigidbody attached with a normal hinge, no motor or spring or anything. The rigidbody is a long block and the hinge is attached at the end of it, so it's like a trapdoor. The block is constrained in position Z and rotation X & Y so it's only moving in 2 dimensions.
I have this trapdoor colliding with a solid collider and I've found several consistent situations where the hinge breaks, not so much breaks as in being destroyed, but more like it's moved from it's actual position.
This mostly happens when the block collides with the solid collider at one its most pointy angles, and what happens is that the rigidbody sort of nudges its way INTO the solid collider, dragging the hinge along. (I have a gravity changing mechanic in my game so I have a lot of these situation potentially available to the player)
Has anybody else experienced this and perhaps found a workaround?
EDIT:
Here's a picture with both colliders highlighted.
Here's a minimal scene where the problem occurs: link
I've uploaded another image. As you can see the problem really lies in that the bug only occurs in certain angles, which leads me to believe something is wrong with the physics engine and not the situation.
So could you describe these "impossible" situations better?
I don't use springs, motors or limits. Both break forces are set to infinity.
I'm well aware and thankful for physics simulation being simplified in games as compared to the real world. However, I don't feel like I've found a super extreme situation and therefore imagined someone else might have experienced this and found a workaround
right sorry for the general comment - people of huge range of abilities on here.
I am playing with your rig now. I just don't know.
One thought ... just turn off gravity on the square hitter-cube. Run. as you know it works perfectly. only then, drop the hitter cube on it.
you will see, it works perfectly !
if the Hitter happens at the same time as the swing, it appear to cause the - let's say - poor performance of PhysX.
I tried increasing the solver, etc etc -- no difference.
I just think it can't handle well the idea that you're trying to HA$$anonymous$$$$anonymous$$ER a piece of wood in to a tight corner.
the hinge at top right is exactly the same as having a wall at the top right.
the ramp is just penetrating both the floor and the "wall" on the right, which it is wedged between the two.
FTR using materials (often a good idea) and making them a tad bouncy would perhaps be a workaround, I bet that would fling it off better.
I am truly sorry I am not "inside PhysX" enough to offer any more insight on this specific "wedgie" problem !! Let's hope someone else is ...
Your answer
Follow this Question
Related Questions
Why are my hinge joints inaccurate? 1 Answer
Duplicated object and original behave differently 0 Answers
CapsuleCast colliding improperly 2 Answers
2D 360 degress platformer example needed 0 Answers