cryptovoxels / issues

🐞 Bugs and issues to be resolved on cryptovoxels
5 stars 1 forks source link

[Bug, P2, #Particles] Particles all appear 90 degrees rotated #77

Closed conlan closed 4 years ago

conlan commented 4 years ago

This appears to have affected all particles in the world:

image

conlan commented 4 years ago
Screen Shot 2020-01-20 at 9 49 44 AM
bnolan commented 4 years ago

Sample location:

/play?coords=NE@1W,36N

bnolan commented 4 years ago

I suspect the bug is here in particle-system.tsx

    var plane = B.MeshBuilder.CreatePlane('particle-target', { size: 1 }, this.scene)
    plane.material = material
    this.mesh = plane
    this.setCommon()
    this.mesh.rotation.x = Math.PI / 2
    this.mesh.translate(B.Axis.Z, -0.1, BABYLON.Space.LOCAL)

Some mismatch between setCommon and this.mesh.rotation, probably doing things in the wrong order, or should be on this.parent.

The particles should be going upwards not sideways.

bnolan commented 4 years ago

Fixed by @punkoffice in 2.37.0!