Using different colliders for horizontal / vertical collision detection and projectiles?

airoll

Member
Hello, I am developing a VR game and as such, want to have colliders that are attached to each bone of the character (e.g. head, arms, legs, etc.). However, I want to minimize the computation required by DeflectHorizontalCollisions and DeflectVerticalCollisions. Therefore, I was wondering if it would be possible to setup just a large capsule collide that encapsulates the entire character, and use only that collider for horizontal / vertical collision detection.

Would the following setup be correct?

On Character: UltimateCharacterLocomotion.ColliderLayerMask = Character Layer Only
On Projectile: Projectile.ImpactLayers = SubCharacter Layer Only

On Character:
  • Large Capsule Collider (Encapsulating Character): Character Layer
  • Body Part Capsule Colliders: SubCharacter Layer
 
Yes, that would be correct. The collision detection is only used by colliders with the Character layer.
 
Top