physics-module-ammonext
physics-module-ammonext copied to clipboard
Physics doesn't work for objects in groups
Hi,
Applying any kind of PHYSICS.XXXModule
to an object inside a group doesn't apply physics to that object.
An example:
This works:
const mesh = new WHS.Plane({
geometry: {
width: 1000,
height: 1000,
},
rotation: new THREE.Euler(-Math.PI / 2,0,0),
modules: [
new PHYSICS.PlaneModule({
mass: 0,
restitution: 0,
}),
],
material: new THREE.MeshPhongMaterial({ color: 0xffffff })
});
ground.addTo(app);
But if I replace the last line by:
const group = new WHS.Group(ground);
group.addTo(app);
The plane will not have any physics.
@sasha240100