Cannot read property 'createStaticConvexHull' of undefined?

my suggestion, check the type of geometry just to make sure it’s not a buffer geometry

Just checked. it is not buffer geometry.

EDIT 1 : Did a second check just to make sure, digging a little deeper.

EDIT 2 : Nope, no buffer geometry anywhere in the code OR in the models.

1 Like

So i figured out that the Ammo.js you were using is not updated, and I also removed the promises
so here is the live remake: https://silver-wormhole.glitch.me/
edit / fork here: https://glitch.com/edit/#!/silver-wormhole

remix before editing so you can have a backup

NB: I can’t find your terrain mesh lol, and i suggest you start using gltf loader as it’ s more updated and webgl friendly :wink:

cheers!

Hi, @waverider404: Thank you SO kindly! :slight_smile: I will take a look at the source now.

One problem though, the files linked to my site return an error : Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID , I have a feeling this has to do with CORs. you may want to disable CORs on your code to fix this. :slight_smile:

Also, why is the camera / objects shaking & why can’t the camera move with keys? I thought I had an FPS controller setup for that.

1 Like

Yeah i was hoping you can get the scripts to load, i was quite busy while trying to rebuild the entire code. Is it working now?

@waverider404: Yes, but the camera / objects are shaking for some reason.

yeah i made the camera track the crate position while it’s falling, you can comment it out, it’s around the SetupStaticConvexHull function

EDIT : Nvm, found it

@waverider404: Ok, so now that the shaking problem is gone, why is my character not using sliding collision when moving up against the container objects?

EDIT : Also, can I use regular ammo.js instead of ammo.small_1.js?

can i see what you’ve been trying to achieve?

Yeah it’s fine, you can also use the regular ammo.js

@waverider404: i mean can i use regular ammo in place of ammo.small_1.js? everytime i removed that file, and then use regular ammo, it gives me error.

yeah if you would have to use the regular ammo.js, you will need to load it asynchrously like you did earlier. In that case also, you will also need to load AmmoUtils.js asynchrously.
done, a fully third person controller prototype! You owe me coffee :wink:
https://silver-wormhole.glitch.me/

@waverider404: WHAT?! This is AMAZING! Thank you SO much!!! I can’t thank you ENOUGH! :sunny: I was testing it just now & I got to the top-right corner container models, and i can go through it. If you go to diagonal container model, the character go slightly through wall. Here are screenshots:



Fixed! The rotation was off

Just in case you need to rotate your crate, rotate the geometry instead

You cannot have diagonal container model?

fixed now:
https://silver-wormhole.glitch.me/

@waverider404: WOW! This is EXCELLENT! I was NOT expecting this! You are SO kind & I appreciate it SO much! Thank You!

I noticed one small issue with gravity. When you move character towards diagonal container model, sometimes the player starts to ‘climb’ the container model on the Y-Axis, then shoots straight across the top of diagonal container on the Z-Axis straight forward.

I will try & get demo in different 3rd person view in order to see the glitch better.

Here is screenshot:

Here is better screenshot:

hmm that’s weird, there’s no jumping on my side. try messing with the gravity and mass a little bit

So @waverider404: I tried changing the gravity value & it’s still letting the player slowly slide up container model on Z-axis while holding the up arrow.

Where is mass defined for container models?