Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Questions on Unity5's physics capabilities

Discussion in 'Physics' started by Taehl, Apr 17, 2015.

  1. Taehl

    Taehl

    Joined:
    Jul 12, 2014
    Posts:
    3
    Hello, community! I had a few ideas for a project, and got to wondering if I could implement them in Unity 5. So without further ado:

    1) What's the scale of objects that Unity's physics handles best? I know different engines prefer specific size ranges and can get wonky if you leave that range. Are we talking something like 1m to 1000m, or 0.01m to 100m, or what?

    2) Does Unity perform better with specific shapes, or do all shapes have roughly the same performance cost? Are certain kinds of constraints extra expensive? Basically, pitfalls and suggestions in the "what performs well and what doesn't" category, please.

    3) Can Unity constrain physics objects in such a way that the individual objects don't collide against each other, making such a collection of objects act like a single macro object? Preferably in a performance-saving way. This sort of thing is sometimes called "parenting", I don't know if Unity uses that phrase. If so, what are the limitations of such constraints? Can the constraint be made to "break" with enough force?

    4) I'd like to be able to put physics objects in a chest, close it, move the chest, open it elsewhere. But while the chest is closed, the objects inside are all frozen or even disabled, to save performance. When opened, all the objects are unfrozen / respawned / whatever. Can Unity do something like this?

    5) If anyone here has played one of the 'Penumbra' or 'Amnesia' games: Know how it lets you physically interact with objects with your cursor? Is there a tutorial or something for implementing this sort of thing in Unity?

    Anyway, I'm super-excited about the new version. Thanks in advance for your answers :)
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    1. Naturally, it's up to you. But there's a very vague setup that favours 1 meter = 1 unit.

    2. This is answered on the physics docs. But here in order of cost: sphere, capsule, box, convex mesh, mesh. If memory serves.

    3. Yes, compound colliders. See docs.

    4. Yes.

    5. Various drag object scripts you can google.
     
    Taehl likes this.
  3. Taehl

    Taehl

    Joined:
    Jul 12, 2014
    Posts:
    3
    Excellent, thank you. It's also great to hear that Unity's documentation is so comprehensive! I'll certainly have to take a look at it.
     
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Good luck, feel free to pop back with all and any questions.