How to load collision mesh from file in Physijs (and Three.js)

754 views Asked by At

I am developing a simple game in WebGL. Mostly, when I search for examples related to Physijs, I see people using spheres and cubes for collision, which they make in the program itself. How would I (like in Source engine) use meshes for collision, located in files? In source engine you would simpy have phy.smd which you would include alongside the model. Is that even possible here? Thanks!

1

There are 1 answers

0
Kevin Kuyl On

physi.js has possibilities for convex and concave collision meshes. But as stated on the physi.js website, concaveMesh has the worst performance. For examples on how to use these, i'd like to refer you to this example.