ammo.js icon indicating copy to clipboard operation
ammo.js copied to clipboard

enableAngularMotor not turning when attaching Mesh with bufferGeometry

Open precociousmouse opened this issue 6 years ago • 1 comments

Hey all, I am currently building a pinball project which uses btHingeConstraints on the flippers. I originally had it working with a three mesh with BoxBufferGeometry to test, but now I am cloning geometry from a loaded GLTF to a new mesh with BufferGeometry and now the motor won't rotate to turn the flippers. Are there limitations in using BufferGeometries as opposed tgo BoxBufferGeometries in these cases?

Just to note, I am creating the hinge constraints when the gltf has loaded, so trying to declare before the geometry is available isn't the problem, and the geometry is being created correctly and positioning correctly on the hinge.

cheers

precociousmouse avatar Jul 19 '19 13:07 precociousmouse

If you want concave dynamic shape in 3d mesh, as an option, atfirst make some triangles form buffergeometry for example - btConvexTriangleMeshShape by set .addTriangle(Ammo.btVector3) then you can build different shape by using btConvexTriangleMeshShape, if dinamic shape - btCompoundShape. if static - btBvhTriangleMeshShape

suddenly4 avatar Dec 18 '24 10:12 suddenly4