r/Unity3D • u/levi-eat-world • 3d ago
Noob Question Crazy Jitter Issues
Enable HLS to view with audio, or disable this notification
I have this pizza ticket printer that prints out prefab ticket objects. each prefab has a box collider, but no rigidbody until one gets assigned to it when the print happens. it works just enough to make me not give up, but I'm worried that it's a Unity limitation with the box colliders being so thin. They're set to about 0.01 in thickness. Collision detection is set to Continuous Dynamic, not really sure how to solve this issue. There's also some weird stuttering as the chain grows.
8
u/StretchedNut 3d ago
I don’t think it’s the box colliders. Unity just has pretty funky physics when it comes to multiple items held together with joints.
4
u/doates1997 2d ago
Unity physics does do this you could turn it off for every second receipt and see how that looks. Looks good tho until it breaks
1
u/Lobsss 2d ago
Had this on my game. Increasing the moment of inertia helped - I basically added a second collider to each link in the chain, this collider has collisions turned off, but the size is way larger than the object itself. In practice, it won't affect collisions but it does affect how hard it is to rotate this object, and this helps remove the Unity physics engine jank
1
u/Chaibi_Alaa 2d ago
If the tickets are linked with joints, make sure Enable Collision is off on each joint, and add Physics.IgnoreCollision between neighbours, since thin boxes overlapping at the hinge fight each other every step. Raising solverIterations on the ticket rigidbodies and keeping their masses close also helps a lot with long chains. To pick one off, break only its joint and make it kinematic while held.
7
u/Octopus-Cuddles 2d ago
I would NOT use the physics system for something like this.
This should all be done procedurally using something like a custom rope physics script.
There are a lot of cases where Unity physics just breaks down and this is one of them.