Character walking on a giant monster, how to Implement it?

Except result:
Shadow of the Colossus PS4: Colossus #6 Barba Boss Fight

The problem is about collider, since character need to move on monster, capsule is not accuracy enough, need to use mesh collider.
And monster is not a static object, it can walk, jump etc, so I need to update mesh collider every frame, which is very heavy, for example, 30K faces mesh take 18ms to update, this is unacceptable. I was think about low poly mesh, but still too expensive.

Curious how Shadow of the Colossus implement it.

  • Mesh collider was not made for geometry that changes. The character should be colliding with convex mesh pieces or primitives the model has been split into. updating the mesh also will not provide any information about velocities so the results are going to be awful.

  • The character is attached to the model and is not colliding with it. Basically the simplest idea is to use fixed joint or spring joint to connect the character to the model. Another option is to parent him. The character movement script would be firing raycasts and the like to determine possible paths/etc. Additionally, the climbable areas could be implemented as an equivalent of “navmesh” - a “climb mesh” made out of low polys which would denote areas the character is allowed to climb. This would be a custom solution, but it can be made deformable.

1 Like

I would use a compound collider. Try creating a ragdoll with Unity’s built-in ragdoll creator and you’ll see the beginnings of what I’m talking about. It’s like a collection of primitive colliders acting as one.

If you start-off with Unity’s initial ragdoll, then you’ll probably need to add additional colliders to fill in details of your character, but just make those children of the already-existing rigidbodies and then you wont need to add any additional rigidbodies or joints.

Then just look up tutorials on how to implement moving platforms, because your boss is essentially a collection of moving platforms now.

2 Likes

Walking on platforms/other moving objects is done either through parenting player to them or calculating a “platform” velocity and adding it to the player’s velocity. That’s putting it brutally simple, since the system needs to handle many things, like how to detect when the player attaches/detaches to the object, how this climbing code interacts with controls, camera, etc. In case of Shadow of the Colossus, I bet it wasnt some holistic system, but a number of scripts for any given interaction.

There exist a post-mortem on Internet, the original was in Japanese, idk if that one is still accessible, but they have been multiple translations or blog commenting it in depth.

Here is translated version from a making of article (original one not the remake). http://selmiak.bplaced.net/games/ps2/index.php?game=sotc&lang=eng&page=makingof