Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

(Case 1028256) NonAlloc physics queries don't return any results

Discussion in '2018.2 Beta' started by PhilSA, Apr 20, 2018.

  1. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
    CapsuleCastNonAlloc and SphereCastNonAlloc don't seem to properly register their RaycastHits in the array passed as argument. The colliders of the hits are always null, even when hits were detected. RaycastNonAlloc doesn't seem to have this problem, though. It properly fills its array of hits. I've submitted the bug report

    I'm curious; are there any important changes being made to physics in 2018.2? Sounds interesting!
     
  2. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    There are raycast related bugs I know of, might be indirectly related to fixes for those?
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    From what I can see, case 1028256 was marked as a duplicate of case 1024195 which has now been fixed. It was verified as an issue and fixed 3 days ago. It landed in 2018.3 and I presume a backport to 2018.2 will be processed soon too.
     
    PhilSA likes this.
  4. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    596
    Yes, it's a consequence of an internal process that is ongoing parallel to the PhysX upgrade right now.

    Basically, the idea is we want to make the physics module completely strippable on a wide set of platforms (think mobile games for instance). This requires an advanced modularisation pass as part of it. In turn, this depends on converting our bindings to a new format that is driven by C# and not by something else (which it's been using since the dawn of times). You'll see the result of the bindings conversion when you're able to download the reference Unity C# code that's been made available recently (check out Aras' blog post). It's much cleaner and concise code, with a lot less smoke and mirrors used.

    The bug we're talking here was exactly a consequence of the bindings migration. I'll check on the backporting status of it.

    Thanks for your interest in physics.
     
    Ostwind, hippocoder, optimise and 2 others like this.
  5. M_R

    M_R

    Joined:
    Apr 15, 2015
    Posts:
    559
  6. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    596
    Exactly that one. I'm saying bindings are C# and will be included in that source drop.
     
  7. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    You are letting users to set this themselves, right? I'm not using built-in physics at all, so I'd want to strip physx out on windows builds if possible. At the moment physx just gets dragged along.
     
    Last edited: Apr 20, 2018
  8. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    596
    Yes, that's the goal. Preferably automatic, so that if physics isn't used in a project, the whole module would get stripped off.
     
  9. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi @yant, can I expect it will become a package in Package Manager soon?
     
  10. EvansT

    EvansT

    Joined:
    Jan 22, 2015
    Posts:
    22
    The problem with this is that if someone accidentally uses a physics related component somewhere in some scene, it will be difficult to figure out why the physics module is getting included in the build. Will there be an easy way to figure that out?
     
    AlkisFortuneFish likes this.
  11. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    596
    I'm afraid not.