I dont know how to reproduce the error it happens very randomly sometimes when I launch the project and then the physics do not work. When I re-launch (refresh) it works again. Its very hard to reproduce it but it does happen sometimes.
I took a screenshot of the error when it happened.
Hmm, that is a strange error which I have not encountered previously. Itās not related to the extension but something with regard to loading Ammo. Iāve made a new Ammo build with the latest version. Please get it from the extension project and try again:
Thank you for reporting. If you could describe the steps how to reproduce the error, I could take a look. Probably early next week at earliest, though.
The current version of Ammo that PlayCanvas is using is not recent enough for this to work. Until the team updates it, you can grab a newer Ammo version from my example project.
Is there any timeline for when the PlayCanvas team is planning to update the ammo version shipped with the engine?
We think this is really useful and would love to have it work without having to replace the ammo version manually.
Is there something specific in new versions of Ammo that you would need/want?
The method get_m_hitCollisionObject on the Ammo.ClosestConvexResultCallback is missing in the current version shipped with PC, which is required for the physics extensions of this thread.
Hey I was having an issue where the sphere raycasting just feltā¦off? like you would have to aim slightly above the sphere you get it to register, and it would register only when the sphere hits you, I have tried other shapes yet I was wondering if I did something wrong or not.
Iāve created v2.0 of convex-cast.js. The current version does not parse in the current version of PlayCanvas.
Note that you still need to use the version of Ammo.js provided by the example project above. The included version of Ammo.js with PlayCanvas 2.9.2 does not have get_m_hitCollisionObject() function on ClosestConvexResultCallback().
Changelog:
Initialize cache upon first use, not during parse
Fix typo where setRotation was being called on incorrect transform variable.
Thank you, @tatelax ! I have updated the original project with your contribution.
@KPal do you know the current version of Ammo in Editor? I was under the impression it was updated last year? Iāve added the convex cast methods to Ammo 5 years ago, so I was under impression the current version should work.
Edit: Iāve just checked the Ammo variant in Editor, and those methods are missing indeed. The current version should be at least 5 years old then.