Search Unity

Performance issue with capsule, kinematic non convex mesh and VR.

Discussion in 'Physics' started by ClosingTime, Nov 13, 2019.

  1. ClosingTime

    ClosingTime

    Joined:
    Nov 23, 2016
    Posts:
    241
    I have been working on my VR game for a while.
    At some point I added enemies, and I used a capsule to prevent them from going through walls.
    At first I built the wall colliders from separate cubes but then also tried to generate the all colliders as one collider mesh.
    In both cases, capsule against wall colliders have a weird performance issue where I would get spikes in CPU usage.
    Normally the scene would render at about 4ms in VR, but the spikes made it jump to 15 ms every second or so.
    After replacing the capsules with cubes for the players, perforamce was stable on 4 ms.
    I also notice this only in VR.
    Another issue is that those spikes are not visible in the profiler, neither deep nor standard.
    They are visible in the stats in the editor game window though.

    Can I report a bug without a project? Otherwise I would need to prepare a new project that reproduce this issue.
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,821