debug display fix

This commit is contained in:
austin 2023-11-05 17:24:04 -05:00
parent e43ce32d70
commit f248bf4e2d
3 changed files with 3 additions and 4 deletions

View File

@ -73,9 +73,9 @@
"physicsCutoff": 3, "physicsCutoff": 3,
"physicsBody": { "physicsBody": {
"type" : "CYLINDER", "type" : "CYLINDER",
"dimension1" : 1, "dimension1" : 0.5,
"dimension2" : 3, "dimension2" : 3,
"dimension3" : 1, "dimension3" : 0.5,
"offsetX" : 0, "offsetX" : 0,
"offsetY" : 1.5, "offsetY" : 1.5,
"offsetZ" : 0 "offsetZ" : 0

View File

@ -122,7 +122,6 @@ public class ProceduralTree {
trunkChild.putData(EntityDataStrings.PHYSICS_COLLISION_BODY_OFFSET, new Vector3f(0,treeModel.getPhysicsBody().getOffsetY(),0)); trunkChild.putData(EntityDataStrings.PHYSICS_COLLISION_BODY_OFFSET, new Vector3f(0,treeModel.getPhysicsBody().getOffsetY(),0));
trunkChild.putData(EntityDataStrings.PHYSICS_MODEL_TEMPLATE, treeModel.getPhysicsBody()); trunkChild.putData(EntityDataStrings.PHYSICS_MODEL_TEMPLATE, treeModel.getPhysicsBody());
trunkChild.putData(EntityDataStrings.PHYSICS_COLLIDABLE, collidable); trunkChild.putData(EntityDataStrings.PHYSICS_COLLIDABLE, collidable);
trunkChild.putData(EntityDataStrings.PHYSICS_MASS, TREE_MASS); trunkChild.putData(EntityDataStrings.PHYSICS_MASS, TREE_MASS);
Globals.clientSceneWrapper.getCollisionEngine().registerCollisionObject(rigidBody, collidable); Globals.clientSceneWrapper.getCollisionEngine().registerCollisionObject(rigidBody, collidable);

View File

@ -942,7 +942,7 @@ public class RenderingEngine {
modelTransformMatrix.translate(cameraModifiedPosition); modelTransformMatrix.translate(cameraModifiedPosition);
modelTransformMatrix.rotate(EntityUtils.getRotation(physicsEntity)); modelTransformMatrix.rotate(EntityUtils.getRotation(physicsEntity));
// modelTransformMatrix.translate(template.getOffsetX(),template.getOffsetY(),template.getOffsetZ()); //center sphere // modelTransformMatrix.translate(template.getOffsetX(),template.getOffsetY(),template.getOffsetZ()); //center sphere
modelTransformMatrix.scale(template.getDimension1(),template.getDimension2(),template.getDimension3()); modelTransformMatrix.scale(template.getDimension1(),template.getDimension2() * 0.5,template.getDimension3());
physicsGraphicsModel.modelMatrix = modelTransformMatrix; physicsGraphicsModel.modelMatrix = modelTransformMatrix;
physicsGraphicsModel.draw(renderPipelineState); physicsGraphicsModel.draw(renderPipelineState);
} }