Open ashconnell opened 8 years ago
I don't think it would be possible out of the box, you would need to add a _physijs
object to the LOD manually, so physijs moves the whole LOD and not the individual meshes. However, that might clash with the implementation of compound objects being created from child objects in physijs. I don't know if the 2.0 rewrite will support physics on arbitrary objects out of the box.
This is just out of my head, but it might be possible to do it by checking the LOD level objects to see which one is visible based on the camera distance with .getObjectForDistance()
. If the mesh changed, you are going to have to reconstruct it (same position, rotation, velocity, etc.) with a less greater level of detail. Remember, the only mesh that could help with detail would be the Physijs.ConvexMesh
object (for dynamic objects). You are going to have to store a few instances of the object, just like LOD.
Is it possible to create a physijs object that also switches LOD as in http://threejs.org/docs/#Reference/Objects/LOD ?