Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Proper way to "stream" collider (physic shape) entity in a large scene?

Discussion in 'Physics for ECS' started by hauwing, Mar 13, 2021.

  1. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    69
    Hi, I am just wondering what is the proper way to "stream" the objects' colliders (physic shape) as the player is approaching that object? I think this is a very common problem in FPS and racing game with a large terrain where you need colliders for trees etc. I am thinking whether I should break down into difference subscenes just like what the Megacity demo is doing but that demo is pretty much unplayable now even if using an old Unity 2019 version so I can't really see it in action. Or I should simply instantiate/destroy the entity according to the player's distance? What is your experience? Thanks.
     
  2. milos85miki

    milos85miki

    Joined:
    Nov 29, 2019
    Posts:
    197
    Please see UnityPhysicsSamples/Assets/Tests/StreamingStressTest as an example. If you're interested in detailed pros/cons of each possible approach, I'd recommend asking on DOTS subforum (parent of physics).