Collision system development for mobile game

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Collision system development for mobile game
Medium
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Developing a Collision System for Mobile Games

Collision detection in a mobile game isn't something that "just works." Standard colliders in Unity and Godot work well on desktop, but on mobile with inconsistent FPS and CPU throttling, the collision system fails precisely when it matters most.

Main Problems with Stock Colliders on Mobile

Tunneling—an object moving at high speed passes through another between two physics steps. CollisionDetectionMode.Continuous in Unity solves this but costs roughly twice as much CPU as Discrete. On budget Android devices this is noticeable.

False positives at seams. PolygonCollider2D with multiple vertices at the junction of two tiles often generates a "phantom" collision—the player stumbles on a flat surface. This is a classic tile game bug. In Unity, solved via Composite Collider 2D, which merges neighboring tile colliders into one polygonal shape.

Expensive MeshColliders. MeshCollider with Convex = false doesn't participate in dynamic-to-dynamic collisions—only static. For arbitrary shapes on dynamic objects, approximate with primitives: multiple BoxCollider/CapsuleCollider instead of one MeshCollider. Manual work, but reduces broadphase load by orders of magnitude.

Layered Collision Matrix

First thing to set up on any project—the layer matrix (Physics > Layer Collision Matrix). Common beginner mistake: leave all layers interacting. With 5 object types that's 25 pair checks instead of 6–8 actually needed.

For mobile this directly impacts broadphase (first collision detection phase where Unity discards unsuitable pairs by AABB). Fewer active pairs—less work per physics step.

Custom Collision Detection for Specific Mechanics

Some genres don't need engine physics. Example: a runner needing only character-ground and character-obstacle collisions. Instead of Rigidbody + Collider—use raycast-based system:

void CheckGround() {
    RaycastHit2D hit = Physics2D.Raycast(
        transform.position,
        Vector2.down,
        groundCheckDistance,
        groundLayer
    );
    isGrounded = hit.collider != null;
    if (isGrounded) groundNormal = hit.normal;
}

void CheckObstacles() {
    // BoxCast forward along movement direction
    RaycastHit2D hit = Physics2D.BoxCast(
        transform.position,
        colliderSize,
        0f,
        Vector2.right,
        obstacleCheckDistance,
        obstacleLayer
    );
    if (hit.collider != null) OnObstacleHit(hit);
}

Lighter, completely deterministic, gives direct control over behavior. No random jitter from solver iterations.

Trigger vs Collision: When to Use What

OnTriggerEnter / OnCollisionEnter—fundamental distinction. Collision is physical impact with impulse, trigger is logical overlap without physics. Common mistake: use Collision where Trigger suffices, adding extra Rigidbody and burdening the solver.

On Godot 4 analogy: Area2D for triggers and zones, CharacterBody2D.move_and_collide() / move_and_slide() for physics. move_and_slide() automatically slides along inclined surfaces—what Unity requires manual implementation via surface normal.

Optimization on Real Devices

Profiling in Unity Profiler (Deep Profile) on target devices is mandatory. Watch Physics.Processing and Physics2D.Processing in timeline. Typical culprits for frame drops:

  • too small Fixed Timestep (creates extra steps on slow frames)
  • Rigidbody.interpolation = Interpolate on dozens of objects
  • dynamic CompositeCollider2D with frequent geometry rebuilds

Timeline for collision system development: simple mechanics—3–5 days, complex (multi-layer geometry, custom detector, optimization for weak devices)—1–3 weeks. Cost calculated individually.