Browse Source

load mesh data and structure meshes

mesh-colliders
FatBoy-DOTC 11 months ago
parent
commit
eafe00555f
  1. 6
      src/engine/collisionEngine/Mesh.java

6
src/engine/collisionEngine/Mesh.java

@ -44,9 +44,9 @@ public class Mesh { @@ -44,9 +44,9 @@ public class Mesh {
Vector3f adjustedBuildingLoc = new Vector3f(building.loc.x,building.loc.y, building.loc.z * -1);
int rotDegrees = (int)Math.toDegrees(building.getBounds().getQuaternion().angleY);
this.mesh_loc = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(meshData.mesh_loc),adjustedBuildingLoc,rotDegrees);
this.mesh_ref = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(meshData.mesh_ref),adjustedBuildingLoc,rotDegrees);
this.mesh_end = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(meshData.mesh_end),adjustedBuildingLoc,rotDegrees);
this.mesh_loc = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(this.meshData.mesh_loc),adjustedBuildingLoc,rotDegrees);
this.mesh_ref = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(this.meshData.mesh_ref),adjustedBuildingLoc,rotDegrees);
this.mesh_end = Vector3f.rotateAroundPoint(adjustedBuildingLoc.add(this.meshData.mesh_end),adjustedBuildingLoc,rotDegrees);
this.mesh_minY = adjustedBuildingLoc.y + this.meshData.mesh_minY;
this.mesh_maxY = adjustedBuildingLoc.y + this.meshData.mesh_maxY;

Loading…
Cancel
Save