I have a player with a rigidbody2D on a 2D tile map that is using a composite collider. When the player is moving horizontally on the tile map, the y velocity randomly jumps between -5 and 5 rather than staying at 0. I’ve heard float imprecision can cause smaller value changes but I’m not sure what could be causing such a big value change. I’ve tested and I am sure that the composite collider is working correctly. What else could be causing this issue?
You’re right, floating-point precision would be an issue if you operate on really large numbers.
Maybe there is another collider that your character is colliding with and it causes your rigid body to move. Also make sure that position is not overridden from your scripts.