Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Unity/Havok Physic webgl support

Discussion in 'Physics for ECS' started by WAYNGames, Aug 1, 2020.

  1. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    974
    Hello,

    I'm trying to start a new project with DOTS for a gamejam and I'd like to build to WebGL.
    From my previous experiences I was woried about hte entties not rendering but that turned out good rigth away.

    However, the physics is not so good.
    When building to WebGL with Unity Physics, it works at first but after a few second I get a "memory access out of bounds".
    When building the same thing in devolopement build my entites just go through each others (no colission at all) and there is an assertion failure in the console.

    I found this somewhat related issue which is not encouraging : https://issuetracker.unity3d.com/is...249.130490665.1596188588-895005550.1573467059

    I tryied to switch to Havok Physics hoping it would would work but I run in another issue with a dll Havok Native not found.

    I tried to build for Windows 64 and it works.

    So is it not supported ? should I build with a sprecific option or setting (to disable multithreading for instnace ?) ?
     
  2. Sima_Havok

    Sima_Havok

    Joined:
    Dec 16, 2019
    Posts:
    52
  3. zardini123

    zardini123

    Joined:
    Jan 5, 2013
    Posts:
    68
    Has WebGL support been discussed for anywhere in the far, far future?
     
  4. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    974
    FYI the first answer cocnerns, I think, only Havok physics, not Unity DOTS Physics.

    It seems that Unity DOTS Physics work in web with project tiny. I did not do anyting crazy with it yet so support may be only partial but seeing the tiny samples you should be able to get most commons things working.
     
  5. zardini123

    zardini123

    Joined:
    Jan 5, 2013
    Posts:
    68
    Being that Havok Physics' backend is in C++ (if I remember correctly), I could imagine them using Web Assembly to get it running on WebGL. I'd imagine Unity Physics works with WebGL now being that it's pure C#.
     
  6. Sima_Havok

    Sima_Havok

    Joined:
    Dec 16, 2019
    Posts:
    52
    We haven't been discussing WebGL support so far. So near and mid term future I wouldn't expect support for it. Far, far future is too vague to comment anyway :)