PlayCanvas physics extension

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.

project link

It happens usually when I load the project in the editor for the first time and launch it

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:

https://playcanvas.com/project/695416/overview/convex-cast-collision-detection

1 Like

I used the new Ammo build, the same thing happens but this time with this error message:

current version of project doesn’t work

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.

I just clicked “Launch” in editor, nothing more

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.

We haven’t yet no as we don’t have any features upcoming that would require us to update the version.

Is there something specific in new versions of Ammo that you would need/want?

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.

One thing that bullet3 also solves is capsule colliders following through large mesh colliders (e.g. terrains).

Right now that happens quite easily.

Hmm, I can create a ticket to investigate an upgrade but honestly, it wouldn’t be high on the priority list unfortunately

3 Likes

Yo this would work elegantly for a parrying system. I wanna make it now

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.

https://playcanvas.com/project/1195880/overview/ant-game-thing

Scripts:
helpfulPlayer

Edit:

Fixed I just had to put this as the pixelratio:

var screenCenterX = (this.app.graphicsDevice.width / 2) / window.devicePixelRatio;
var screenCenterY = (this.app.graphicsDevice.height / 2) / window.devicePixelRatio;