javascript - how to add joint and create joint for custom mesh in babylon js -
function createjoint(imp1, imp2) { var joint = new babylon.distancejoint({ maxdistance: distancebetweenpoints }) imp1.addjoint(imp2, joint); } spheres.foreach(function(point, idx) { var mass = 1; point.physicsimpostor = new babylon.physicsimpostor(point, babylon.physicsimpostor.particleimpostor, { mass: mass }, scene); if (idx >= subdivisions) { createjoint(point.physicsimpostor, spheres[idx - subdivisions].physicsimpostor); // if (idx % subdivisions) { createjoint(point.physicsimpostor, spheres[idx - 1].physicsimpostor); } } });]
i trying add joint , create joint custom imposter using above code.i stuck code.please me
Comments
Post a Comment