Search Unity

How to model a spaceship with interior ?

Discussion in 'World Building' started by Xhitman, Aug 5, 2020.

  1. Xhitman

    Xhitman

    Joined:
    Oct 30, 2015
    Posts:
    452
    1. Use nav mesh surface inside and outside. I want to use nav mesh agent to move NPC around.
    2. Spaceship is not static, need nav mesh surface local update (performance issue)

    The video is my current design, the performance is not good. It become very slow when the battleship start moving.

    The old design is:
    1. battleship use mesh collider, so character can walk on the top.
    2. battleship interior (many floors) use mesh collider, so character can walk.
    3. local nav mesh surface rebuild around battleship

     

    Attached Files:

  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Give up on nav mesh. It is not appropriate for this usage; it really only works with static geometry.

    The only way I could see to make it work for something like this is if your battleship is fixed at 0,0,0 and you move everything else around it (which might be appropriate for some kinds of games).

    Otherwise, if you like the nav mesh style, look for a third-party A* asset that does basically the same thing but works with dynamic or moving meshes at runtime.
     
  3. Xhitman

    Xhitman

    Joined:
    Oct 30, 2015
    Posts:
    452
    I break down the spaceship into many mesh collider walls, but not sure it is a good approach or not.

    For the A*, I will try the point pathfinding, as the multi floor pathfinding only available in paid version.

     
  4. Xhitman

    Xhitman

    Joined:
    Oct 30, 2015
    Posts:
    452
    I think it not work. it is good for physical control in unity, but very bad for model texture It multiply the work load by up to 6. One texture increase to six texture.