High Speed Collision detection and behavior

I’m working on fixing up a project of mine and addressing a big issue the last time I tried working on it.

The game is essentially a rope swinging game, where you launch a grappling-hook like chain at an object, and can swing around, or let go and let the acceleration carry you in the desired direction. My biggest issue though is dealing with collision.

I have to make collision work under two scenarios: when in “tangental” motion (ie moving in a straight line, bouncing off of things pin-ball style) and “angular” motion (where while swinging you bounce off an object or come to rest on an object).

I found a couple of things online that kind of worked but I still ran into issues where I’d bounce inside of objects, and if you try to launch a chain inside an object the app would crash.

The big issue I think comes from the fact that the player avatar is a sphere bouncing off irregular, often curved objects. I tried using this one method where it used the normal angle of the point you hit, but that still didn’t produce favorable results.

Anyone found a solution to this before? This is all purely 2D motion, btw.

Any help would be much appreciated!

A few things might help with this:-

  • Reducing the size of the physics timestep using Time.fixedDeltaTime
  • Using primitive colliders or convex mesh colliders where possible
  • Using the DontGoThroughThings script on the Unify wiki to anticipate collisions