youvsvirus / youvsvirus-unity

Unity version of the you vs virus game.
GNU General Public License v3.0
1 stars 1 forks source link

The dead no longer interact with the living #29

Closed ghost closed 4 years ago

ghost commented 4 years ago

Movement and collisions of dead NPCs and the player are now disabled. When a human dies, its rigidbody is simply removed from the simulation.

Also, I've introduced Sorting Layers for controlling Z-order of rendering. From lowest to highest:

  1. Background
  2. Dead
  3. Living
  4. Player

These changes are built on top of #28, so we should resolve that one first. Resolves #27 .

ghost commented 4 years ago

@maccxs You're right, I've added the comments. I also realized that just disabling physics simulation for the dead is quite a dirty fix, so I've made it a little more thorough.

maccxs commented 4 years ago

Thanks, this is most helpful!

maccxs commented 4 years ago

This looks ready to be merged (after the other branch has been merged).