← Back to context

Comment by BobaFloutist

2 months ago

Speaking of bugs, I remember the last time I thought maybe I'd try making a simple game in Unity I gave up when I couldn't stop clipping through walls.

The collision was clearly working, just some n% of the time you'd end up on the wrong side of the clean flat rectangle you were walking into.

I lost interest pretty soon after that.

That's not a bug just an inherent problem with using very thin colliders with a discrete collision detection system. It's not a Unity problem and Unity allows you to configure continuous collision detection to prevent tunneling https://docs.unity3d.com/6000.3/Documentation/Manual/Continu...

Game development is full of domain knowledge like this because games need to make compromises ensure completing simulation updates at no lower than 30Hz.

  • That's fair. I just remember being very frustrated that felt like a basic feature I was implementing per the tutorial broke immediately in such a fundamental way in such a simple situation, and not being able to find any sort of explanation or solution at the time. Possibly it was fully my fault and the info was readily available!

    • I think its really just the trappings of game development being full of tribal knowledge.

      The tutorial probably should have instructed you create box colliders for walls (giving a greater area for the physics engine to catch collisions) rather than a simple plane/quad which would lead to the exact issues you had, or at least explained why a box works better than a plane.

      I guess you have to balance the necessary information with overload in your tutorial or at least have an aside or additional reading that really helps understand many of these internalized understandings.