I import an OBJ file with texture and create a clone of it with the
code below. The first OBJ becomes a rigid body and can detect
collisions, but the clone cannot. What am I doing wrong here?

private function onResourceRetrieved(event : ResourceEvent) : void
{
                                _containerCity =
ObjectContainer3D(event.resource);
                                view.scene.addChild(_containerCity);

                                var 
mesh:Mesh=Mesh(_containerCity.getChildAt(0));
                                mesh.geometry.scale(100);
                                mesh.material = gameMaterial;

                                var 
mesh2:Mesh=Mesh(_containerCity.getChildAt(0).clone());
                                var mclone:ObjectContainer3D =
ObjectContainer3D(_containerCity.getChildAt(0).clone());
                                mclone.z = -2100;
                                view.scene.addChild(mclone);

                                //create the triangle mesh for the original OBJ
                                var triangleMesh:JTriangleMesh = 
physics.createMesh(mesh, new
Vector3D(), new Matrix3D(), 10, 10);

                                //create the triangle mesh for the
clone of the OBJ
                                var triangleMesh:JTriangleMesh = 
physics.createMesh(mesh2, new
Vector3D(), new Matrix3D(), 10, 10);

Reply via email to