romdi / IOS-Assets

0 stars 0 forks source link

Add goal net movement on ball impact #1

Open Aryan14 opened 11 years ago

Aryan14 commented 11 years ago

The goal net should move when the ball hits it.

There are two possible approaches for this:

  1. Ragdoll

    Create a ragdoll skeleton in a modelling program which reacts to collision according to the Source engine's physics engine, similar to the mattress model or a dead player's model in the various Source games.

    Pro:

    • The collision mesh moves with the impacting ball, so the behavior should look fairly realistic.

    Con:

    • Possibly expensive (although FPS dips shouldn't be as much of a problem, since ball/net collision only happens when the ball is no longer in the game, therefore not affecting players' performances)
    • Can only have a couple of collision mesh parts, thus making it hard to have realistic looking dents in the net on impact.
  2. Shader

    Write a vertex shader which moves the net vertices on ball impact.

    Pro:

    • Can produce much more realistic looking net movement effects than the ragdoll

    Con:

    • How to make the ball move with the net vertices, instead of passing through the net or bouncing of a collision box