Search Unity

Sea of collisions

Discussion in 'Scripting' started by brandonschlosser101, Aug 22, 2020.

  1. brandonschlosser101

    brandonschlosser101

    Joined:
    Apr 19, 2018
    Posts:
    15
    I've been trying to figure out a way to basically have a sphere run through a sea of game objects and disabling anything entering it's trigger zone then disabling on trigger exit, that doesn't kill fps. As of now I use 9 chunks with the ball in the center and set the whole thing to balls position when it leaves a central trigger while also checking each and every gameobject inside the chunk for trigger collision as it goes. GPU instancing is used which helps alot but there has to be a better way.

    Any ideas?

    Or... Is there a better way to get the visual effect of a moving game object "parting a large sea of other gameobjects" as it moves through?

    Any and all help appreciated
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,736
    The first step for any performance issue is to attach the profiler and see what's actually killing your FPS.

    If you can't get the traditional performance you need, perhaps use something like DOTS/ECS? Not sure what the state of it is these days, but there's a forum for it:

    https://forum.unity.com/forums/data-oriented-technology-stack.147/