diff --git a/assets/Data/entity/creatures/human.json b/assets/Data/entity/creatures/human.json index b5cdc0f2..24d5b43e 100644 --- a/assets/Data/entity/creatures/human.json +++ b/assets/Data/entity/creatures/human.json @@ -547,14 +547,18 @@ "z": 0.0 } }, - "idleData": { - "animation": { - "nameFirstPerson" : "BindPose", - "nameThirdPerson" : "Idle", - "priorityCategory" : "IDLE" + "graphicsTemplate": { + "model": { + "idleData": { + "animation": { + "nameFirstPerson" : "BindPose", + "nameThirdPerson" : "Idle", + "priorityCategory" : "IDLE" + } + }, + "path" : "Models/creatures/person2/person2_1.glb" } }, - "modelPath" : "Models/creatures/person2/person2_1.glb", "viewModelData" : { "heightFromOrigin" : 1.3, "cameraViewDirOffsetY" : -0.3, diff --git a/assets/Data/entity/creatures/skeleton.json b/assets/Data/entity/creatures/skeleton.json index 9280b536..6204cea2 100644 --- a/assets/Data/entity/creatures/skeleton.json +++ b/assets/Data/entity/creatures/skeleton.json @@ -431,14 +431,18 @@ "z": 0.0 } }, - "idleData": { - "animation": { - "nameFirstPerson" : "Idle", - "nameThirdPerson" : "Idle", - "priorityCategory" : "IDLE" + "graphicsTemplate": { + "model": { + "idleData": { + "animation": { + "nameFirstPerson" : "Idle", + "nameThirdPerson" : "Idle", + "priorityCategory" : "IDLE" + } + }, + "path" : "Models/creatures/skeleton/skeleton1.glb" } }, - "modelPath" : "Models/creatures/skeleton/skeleton1.glb", "viewModelData" : { "heightFromOrigin" : 1.3, "cameraViewDirOffsetY" : -0.3, diff --git a/assets/Data/entity/foliage.json b/assets/Data/entity/foliage.json index ae28a450..608aa287 100644 --- a/assets/Data/entity/foliage.json +++ b/assets/Data/entity/foliage.json @@ -11,7 +11,11 @@ "growthModel": { "growthRate" : 0.001 }, - "modelPath" : "Models/foliage/grass2.fbx" + "graphicsTemplate": { + "model": { + "path" : "Models/foliage/grass2.fbx" + } + } }, { "id" : "oak", diff --git a/assets/Data/entity/items.json b/assets/Data/entity/items.json index d044f212..ff26506e 100644 --- a/assets/Data/entity/items.json +++ b/assets/Data/entity/items.json @@ -54,7 +54,6 @@ }, { "id" : "Katana2H", - "modelPath" : "Models/items/weapons/katana1alt.glb", "weaponData" : { "weaponClass" : "sword2h", "damage" : 10, @@ -114,7 +113,17 @@ "TARGETABLE", "OUTLINE" ], - "idleAnim" : "Idle", + "graphicsTemplate": { + "model": { + "idleData": { + "animation": { + "nameThirdPerson" : "Idle", + "priorityCategory" : "IDLE" + } + }, + "path" : "Models/items/weapons/katana1alt.glb" + } + }, "collidable": { "type" : "CUBE", "dimension1" : 0.04, @@ -320,7 +329,6 @@ { "id" : "terrainTool", - "modelPath": "Models/basic/geometry/unitvector.glb", "tokens" : [ "GRAVITY", "TARGETABLE" @@ -328,6 +336,11 @@ "equipData": { "equipClass" : "tool" }, + "graphicsTemplate": { + "model": { + "path" : "Models/basic/geometry/unitvector.glb" + } + }, "clientSidePrimary": "OPEN_VOXEL", "collidable": { "type" : "CUBE", diff --git a/assets/Data/entity/objects/containers.json b/assets/Data/entity/objects/containers.json index 51697332..68507b15 100644 --- a/assets/Data/entity/objects/containers.json +++ b/assets/Data/entity/objects/containers.json @@ -29,7 +29,11 @@ "tokens": [ "GRAVITY" ], - "modelPath" : "Models/objects/crate2.glb" + "graphicsTemplate": { + "model": { + "path" : "Models/objects/crate2.glb" + } + } } ], diff --git a/assets/Data/entity/objects/furniture.json b/assets/Data/entity/objects/furniture.json index 772c55dc..6b0f50f6 100644 --- a/assets/Data/entity/objects/furniture.json +++ b/assets/Data/entity/objects/furniture.json @@ -48,7 +48,11 @@ "z": 0.0 } }, - "modelPath" : "Models/objects/furniture/torch1.glb", + "graphicsTemplate": { + "model": { + "path" : "Models/objects/furniture/torch1.glb" + } + }, "tokens": [ ] } diff --git a/assets/Data/entity/objects/game_objects.json b/assets/Data/entity/objects/game_objects.json index b6b25409..851b71a8 100644 --- a/assets/Data/entity/objects/game_objects.json +++ b/assets/Data/entity/objects/game_objects.json @@ -3,7 +3,11 @@ { "id" : "spawnPoint", - "modelPath" : "Models/gameobj/token.glb", + "graphicsTemplate": { + "model": { + "path" : "Models/gameobj/token.glb" + } + }, "tokens": [ "SPAWNPOINT" ] diff --git a/docs/src/progress/renderertodo.md b/docs/src/progress/renderertodo.md index 288e1ded..461e9d3d 100644 --- a/docs/src/progress/renderertodo.md +++ b/docs/src/progress/renderertodo.md @@ -836,13 +836,11 @@ Autodisabling implementation Fix static friction coeff causing player to slide on shallow slopes - Turns out it needed auto disabling logic Change timescale for test +Refactor graphics entity definitions to be under dedicated object # TODO -IMMEDIATE SCALING ISSUES - - Always enforce opengl interface across all opengl calls jesus christ the bone uniform bug was impossible - Ability to fully reload game engine state without exiting client - Back out to main menu and load a new level without any values persisting - Receive a teleport packet from server and flush all game state before requesting state from server again @@ -872,6 +870,7 @@ Rearchitecting - Main render is a ui element (that we can have multiple of) - Shader handling updates to allow for library based shader compilation - Also allow injecting consts from the engine itself (ie max lights is dynamically injected, that way never have to worry about .glsl and .java not aligning) + - Cache busting for particle atlas cache Code cleanup - Rename "BehaviorTree" to be "Component" (what it actually is) diff --git a/src/main/java/electrosphere/client/foliagemanager/FoliageCell.java b/src/main/java/electrosphere/client/foliagemanager/FoliageCell.java index e9073e0d..ff065454 100644 --- a/src/main/java/electrosphere/client/foliagemanager/FoliageCell.java +++ b/src/main/java/electrosphere/client/foliagemanager/FoliageCell.java @@ -155,7 +155,7 @@ public class FoliageCell { //queue ambient foliage models for(FoliageType foliageType : Globals.gameConfigCurrent.getFoliageMap().getFoliageList()){ if(foliageType.getTokens().contains(FoliageType.TOKEN_AMBIENT)){ - Globals.assetManager.addModelPathToQueue(foliageType.getModelPath()); + Globals.assetManager.addModelPathToQueue(foliageType.getGraphicsTemplate().getModel().getPath()); Globals.assetManager.addShaderToQueue(vertexPath, fragmentPath); } } @@ -246,7 +246,7 @@ public class FoliageCell { //create entity Entity grassEntity = EntityCreationUtils.createClientSpatialEntity(); - TextureInstancedActor.attachTextureInstancedActor(grassEntity, foliageType.getModelPath(), vertexPath, fragmentPath, dataTexture, drawCount); + TextureInstancedActor.attachTextureInstancedActor(grassEntity, foliageType.getGraphicsTemplate().getModel().getPath(), vertexPath, fragmentPath, dataTexture, drawCount); EntityUtils.getPosition(grassEntity).set(realPosition); EntityUtils.getRotation(grassEntity).set(0,0,0,1); EntityUtils.getScale(grassEntity).set(1,1,1); diff --git a/src/main/java/electrosphere/entity/state/equip/ClientEquipState.java b/src/main/java/electrosphere/entity/state/equip/ClientEquipState.java index ce50e8a2..359682b6 100644 --- a/src/main/java/electrosphere/entity/state/equip/ClientEquipState.java +++ b/src/main/java/electrosphere/entity/state/equip/ClientEquipState.java @@ -166,7 +166,7 @@ public class ClientEquipState implements BehaviorTree { //make sure it's visible if(EntityUtils.getActor(toEquip) == null){ Item itemData = Globals.gameConfigCurrent.getItemMap().getItem(ItemUtils.getType(toEquip)); - EntityCreationUtils.makeEntityDrawable(toEquip, itemData.getModelPath()); + EntityCreationUtils.makeEntityDrawable(toEquip, itemData.getGraphicsTemplate().getModel().getPath()); if(itemData.getIdleAnim() != null){ toEquip.putData(EntityDataStrings.ANIM_IDLE,itemData.getIdleAnim()); } diff --git a/src/main/java/electrosphere/entity/state/idle/ClientIdleTree.java b/src/main/java/electrosphere/entity/state/idle/ClientIdleTree.java index 4f7c5a60..a00c65e2 100644 --- a/src/main/java/electrosphere/entity/state/idle/ClientIdleTree.java +++ b/src/main/java/electrosphere/entity/state/idle/ClientIdleTree.java @@ -1,7 +1,6 @@ package electrosphere.entity.state.idle; -import electrosphere.net.parser.net.message.SynchronizationMessage; import electrosphere.entity.state.client.firstPerson.FirstPersonTree; import electrosphere.entity.state.movement.groundmove.ClientGroundMovementTree; import electrosphere.entity.state.movement.groundmove.ClientGroundMovementTree.MovementTreeState; @@ -49,7 +48,7 @@ public class ClientIdleTree implements BehaviorTree { //check if this is a creature, if so add its idle data CreatureData creatureType = Globals.gameConfigCurrent.getCreatureTypeLoader().getType(CreatureUtils.getType(parent)); if(creatureType != null){ - idleData = creatureType.getIdleData(); + idleData = creatureType.getGraphicsTemplate().getModel().getIdleData(); } //TODO: if object, check if object has idle data and add accordingly } @@ -93,7 +92,9 @@ public class ClientIdleTree implements BehaviorTree { entityActor.playAnimation(idleData.getAnimation(),true); entityActor.incrementAnimationTime(0.0001); } - FirstPersonTree.conditionallyPlayAnimation(parent, idleData.getAnimation()); + if(idleData != null){ + FirstPersonTree.conditionallyPlayAnimation(parent, idleData.getAnimation()); + } } break; case NOT_IDLE: diff --git a/src/main/java/electrosphere/entity/types/common/CommonEntityUtils.java b/src/main/java/electrosphere/entity/types/common/CommonEntityUtils.java index f46ac0da..446402ea 100644 --- a/src/main/java/electrosphere/entity/types/common/CommonEntityUtils.java +++ b/src/main/java/electrosphere/entity/types/common/CommonEntityUtils.java @@ -68,6 +68,7 @@ import electrosphere.game.data.creature.type.rotator.RotatorConstraint; import electrosphere.game.data.creature.type.rotator.RotatorItem; import electrosphere.game.data.creature.type.rotator.RotatorSystem; import electrosphere.game.data.foliage.type.FoliageType; +import electrosphere.game.data.graphics.GraphicsTemplate; import electrosphere.game.data.item.type.Item; import electrosphere.net.parser.net.message.EntityMessage; import electrosphere.net.parser.net.message.NetworkMessage; @@ -110,9 +111,9 @@ public class CommonEntityUtils { for(String token : rawType.getTokens()){ switch(token){ case "GENERATE_COLLISION_OBJECT": { - Globals.assetManager.addCollisionMeshToQueue(new PhysicsMeshQueueItem(Globals.clientSceneWrapper.getCollisionEngine(),rawType.getModelPath())); + Globals.assetManager.addCollisionMeshToQueue(new PhysicsMeshQueueItem(Globals.clientSceneWrapper.getCollisionEngine(),rawType.getGraphicsTemplate().getModel().getPath())); Globals.clientSceneWrapper.getScene().registerBehaviorTree(new BehaviorTree() {public void simulate(float deltaTime) { - DBody collisionObject = Globals.assetManager.fetchCollisionObject(Globals.clientSceneWrapper.getCollisionEngine(),rawType.getModelPath()); + DBody collisionObject = Globals.assetManager.fetchCollisionObject(Globals.clientSceneWrapper.getCollisionEngine(),rawType.getGraphicsTemplate().getModel().getPath()); if(collisionObject != null){ Globals.clientSceneWrapper.getScene().deregisterBehaviorTree(this); CollisionObjUtils.clientAttachCollisionObjectToEntity(entity, collisionObject, 0, Collidable.TYPE_OBJECT); @@ -120,9 +121,9 @@ public class CommonEntityUtils { }}); } break; case "GENERATE_COLLISION_TERRAIN": { - Globals.assetManager.addCollisionMeshToQueue(new PhysicsMeshQueueItem(Globals.clientSceneWrapper.getCollisionEngine(),rawType.getModelPath())); + Globals.assetManager.addCollisionMeshToQueue(new PhysicsMeshQueueItem(Globals.clientSceneWrapper.getCollisionEngine(),rawType.getGraphicsTemplate().getModel().getPath())); Globals.clientSceneWrapper.getScene().registerBehaviorTree(new BehaviorTree() {public void simulate(float deltaTime) { - DBody collisionObject = Globals.assetManager.fetchCollisionObject(Globals.clientSceneWrapper.getCollisionEngine(),rawType.getModelPath()); + DBody collisionObject = Globals.assetManager.fetchCollisionObject(Globals.clientSceneWrapper.getCollisionEngine(),rawType.getGraphicsTemplate().getModel().getPath()); if(collisionObject != null){ Globals.clientSceneWrapper.getScene().deregisterBehaviorTree(this); CollisionObjUtils.clientAttachCollisionObjectToEntity(entity, collisionObject, 0, Collidable.TYPE_TERRAIN); @@ -140,9 +141,18 @@ public class CommonEntityUtils { //Drawable stuff // // - if(rawType.getModelPath() != null && EntityUtils.getActor(entity) == null && generateDrawable == true){ - EntityCreationUtils.makeEntityDrawable(entity, rawType.getModelPath()); - entity.putData(EntityDataStrings.DRAW_CAST_SHADOW, true); + if(rawType.getGraphicsTemplate() != null){ + GraphicsTemplate graphicsTemplate = rawType.getGraphicsTemplate(); + if(graphicsTemplate.getModel() != null && graphicsTemplate.getModel().getPath() != null && EntityUtils.getActor(entity) == null && generateDrawable == true){ + EntityCreationUtils.makeEntityDrawable(entity, graphicsTemplate.getModel().getPath()); + entity.putData(EntityDataStrings.DRAW_CAST_SHADOW, true); + } + //idle tree & generic stuff all creatures have + if(graphicsTemplate.getModel() != null && graphicsTemplate.getModel().getIdleData() != null){ + ClientIdleTree idleTree = new ClientIdleTree(entity); + entity.putData(EntityDataStrings.TREE_IDLE, idleTree); + Globals.clientScene.registerBehaviorTree(idleTree); + } } Actor creatureActor = EntityUtils.getActor(entity); @@ -362,12 +372,6 @@ public class CommonEntityUtils { ClientLifeTree.attachTree(entity,rawType.getHealthSystem()); Globals.clientScene.registerEntityToTag(entity, EntityTags.LIFE_STATE); } - //idle tree & generic stuff all creatures have - if(rawType.getIdleData() != null){ - ClientIdleTree idleTree = new ClientIdleTree(entity); - entity.putData(EntityDataStrings.TREE_IDLE, idleTree); - Globals.clientScene.registerBehaviorTree(idleTree); - } return entity; } @@ -400,9 +404,9 @@ public class CommonEntityUtils { for(String token : rawType.getTokens()){ switch(token){ case "GENERATE_COLLISION_OBJECT": { - Globals.assetManager.addCollisionMeshToQueue(new PhysicsMeshQueueItem(realm.getCollisionEngine(),rawType.getModelPath())); + Globals.assetManager.addCollisionMeshToQueue(new PhysicsMeshQueueItem(realm.getCollisionEngine(),rawType.getGraphicsTemplate().getModel().getPath())); ServerBehaviorTreeUtils.attachBTreeToEntity(entity, new BehaviorTree() {public void simulate(float deltaTime) { - DBody collisionObject = Globals.assetManager.fetchCollisionObject(realm.getCollisionEngine(),rawType.getModelPath()); + DBody collisionObject = Globals.assetManager.fetchCollisionObject(realm.getCollisionEngine(),rawType.getGraphicsTemplate().getModel().getPath()); if(collisionObject != null){ ServerBehaviorTreeUtils.detatchBTreeFromEntity(entity, this); CollisionObjUtils.serverAttachCollisionObjectToEntity(entity, collisionObject, 0, Collidable.TYPE_OBJECT); @@ -410,9 +414,9 @@ public class CommonEntityUtils { }}); } break; case "GENERATE_COLLISION_TERRAIN": { - Globals.assetManager.addCollisionMeshToQueue(new PhysicsMeshQueueItem(realm.getCollisionEngine(),rawType.getModelPath())); + Globals.assetManager.addCollisionMeshToQueue(new PhysicsMeshQueueItem(realm.getCollisionEngine(),rawType.getGraphicsTemplate().getModel().getPath())); ServerBehaviorTreeUtils.attachBTreeToEntity(entity, new BehaviorTree() {public void simulate(float deltaTime) { - DBody collisionObject = Globals.assetManager.fetchCollisionObject(realm.getCollisionEngine(),rawType.getModelPath()); + DBody collisionObject = Globals.assetManager.fetchCollisionObject(realm.getCollisionEngine(),rawType.getGraphicsTemplate().getModel().getPath()); if(collisionObject != null){ ServerBehaviorTreeUtils.detatchBTreeFromEntity(entity, this); CollisionObjUtils.serverAttachCollisionObjectToEntity(entity, collisionObject, 0, Collidable.TYPE_TERRAIN); @@ -430,8 +434,16 @@ public class CommonEntityUtils { //Posing stuff // // - if(rawType.getModelPath() != null && EntityUtils.getPoseActor(entity) == null && generateDrawable == true){ - EntityCreationUtils.makeEntityPoseable(entity, rawType.getModelPath()); + if(rawType.getGraphicsTemplate() != null){ + GraphicsTemplate graphicsTemplate = rawType.getGraphicsTemplate(); + if(graphicsTemplate.getModel() != null && graphicsTemplate.getModel().getPath() != null && EntityUtils.getPoseActor(entity) == null && generateDrawable == true){ + EntityCreationUtils.makeEntityPoseable(entity, graphicsTemplate.getModel().getPath()); + entity.putData(EntityDataStrings.DRAW_CAST_SHADOW, true); + } + //idle tree & generic stuff all creatures have + if(graphicsTemplate.getModel() != null && graphicsTemplate.getModel().getIdleData() != null){ + ServerIdleTree.attachTree(entity, graphicsTemplate.getModel().getIdleData()); + } } PoseActor creatureActor = EntityUtils.getPoseActor(entity); // @@ -659,10 +671,6 @@ public class CommonEntityUtils { ServerLifeTree.attachTree(entity, rawType.getHealthSystem()); ServerEntityTagUtils.attachTagToEntity(entity, EntityTags.LIFE_STATE); } - //idle tree & generic stuff all creatures have - if(rawType.getIdleData() != null){ - ServerIdleTree.attachTree(entity, rawType.getIdleData()); - } return entity; diff --git a/src/main/java/electrosphere/entity/types/foliage/FoliageUtils.java b/src/main/java/electrosphere/entity/types/foliage/FoliageUtils.java index be453f88..39f0565e 100644 --- a/src/main/java/electrosphere/entity/types/foliage/FoliageUtils.java +++ b/src/main/java/electrosphere/entity/types/foliage/FoliageUtils.java @@ -39,7 +39,6 @@ public class FoliageUtils { rVal = ProceduralTree.clientGenerateProceduralTree(type, 0); } else { rVal = EntityCreationUtils.createClientSpatialEntity(); - EntityCreationUtils.makeEntityDrawable(rVal, rawType.getModelPath()); } // // diff --git a/src/main/java/electrosphere/game/data/common/CommonEntityType.java b/src/main/java/electrosphere/game/data/common/CommonEntityType.java index 60ac0235..8d53567b 100644 --- a/src/main/java/electrosphere/game/data/common/CommonEntityType.java +++ b/src/main/java/electrosphere/game/data/common/CommonEntityType.java @@ -6,7 +6,6 @@ import electrosphere.game.data.collidable.CollidableTemplate; import electrosphere.game.data.collidable.HitboxData; import electrosphere.game.data.common.light.PointLightDescription; import electrosphere.game.data.creature.type.HealthSystem; -import electrosphere.game.data.creature.type.IdleData; import electrosphere.game.data.creature.type.LookAtSystem; import electrosphere.game.data.creature.type.ViewModelData; import electrosphere.game.data.creature.type.ai.AITreeData; @@ -78,21 +77,11 @@ public class CommonEntityType { */ LookAtSystem lookAtSystem; - /** - * The model path for this creature - */ - String modelPath; - /** * The view model data for this creature */ ViewModelData viewModelData; - /** - * The idle data for this creature - */ - IdleData idleData; - /** * The block system for this creature */ @@ -167,14 +156,6 @@ public class CommonEntityType { return tokens; } - /** - * Gets the path for the model for this creature - * @return The model path - */ - public String getModelPath() { - return modelPath; - } - /** * Gets the list of data of movement types available to this creature * @return The list of movement type data @@ -255,14 +236,6 @@ public class CommonEntityType { return viewModelData; } - /** - * Gets the idle data for this creature type (ie animation data) - * @return The idle data - */ - public IdleData getIdleData(){ - return idleData; - } - /** * Gets the block system data for this creature type * @return The block system data diff --git a/src/main/java/electrosphere/game/data/graphics/GraphicsTemplate.java b/src/main/java/electrosphere/game/data/graphics/GraphicsTemplate.java index d8e552ef..96f518a3 100644 --- a/src/main/java/electrosphere/game/data/graphics/GraphicsTemplate.java +++ b/src/main/java/electrosphere/game/data/graphics/GraphicsTemplate.java @@ -13,6 +13,16 @@ public class GraphicsTemplate { //??? TODO: investigate Map shaderMap; + /** + * The procedural model definition + */ + ProceduralModel proceduralModel; + + /** + * The non-procedural model definition + */ + NonproceduralModel model; + public List getShaderOverrideMeshList(){ return shaderOverrideMeshList; } @@ -21,6 +31,30 @@ public class GraphicsTemplate { return shaderMap; } + public void setShaderOverrideMeshList(List shaderOverrideMeshList) { + this.shaderOverrideMeshList = shaderOverrideMeshList; + } + + public void setShaderMap(Map shaderMap) { + this.shaderMap = shaderMap; + } + + public ProceduralModel getProceduralModel() { + return proceduralModel; + } + + public void setProceduralModel(ProceduralModel proceduralModel) { + this.proceduralModel = proceduralModel; + } + + public NonproceduralModel getModel() { + return model; + } + + public void setModel(NonproceduralModel model) { + this.model = model; + } + } diff --git a/src/main/java/electrosphere/game/data/graphics/NonproceduralModel.java b/src/main/java/electrosphere/game/data/graphics/NonproceduralModel.java new file mode 100644 index 00000000..968f4931 --- /dev/null +++ b/src/main/java/electrosphere/game/data/graphics/NonproceduralModel.java @@ -0,0 +1,38 @@ +package electrosphere.game.data.graphics; + +import electrosphere.game.data.creature.type.IdleData; + +/** + * A non-procedural model + */ +public class NonproceduralModel { + + /** + * The path to the model + */ + String path; + + /** + * The idle data for the model + */ + IdleData idleData; + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public IdleData getIdleData() { + return idleData; + } + + public void setIdleData(IdleData idleData) { + this.idleData = idleData; + } + + + +} diff --git a/src/main/java/electrosphere/game/data/graphics/ProceduralModel.java b/src/main/java/electrosphere/game/data/graphics/ProceduralModel.java new file mode 100644 index 00000000..f78c140f --- /dev/null +++ b/src/main/java/electrosphere/game/data/graphics/ProceduralModel.java @@ -0,0 +1,23 @@ +package electrosphere.game.data.graphics; + +import electrosphere.game.data.foliage.type.TreeModel; + +/** + * A procedurally-generated model + */ +public class ProceduralModel { + + /** + * Model for generating a procedural tree + */ + TreeModel treeModel; + + /** + * Gets the procedural tree model + * @return The procedural tree model if it exists, null otherwise + */ + public TreeModel getTreeModel(){ + return treeModel; + } + +} diff --git a/src/main/java/electrosphere/renderer/ui/components/CharacterCustomizer.java b/src/main/java/electrosphere/renderer/ui/components/CharacterCustomizer.java index 8042f4d8..0953a25b 100644 --- a/src/main/java/electrosphere/renderer/ui/components/CharacterCustomizer.java +++ b/src/main/java/electrosphere/renderer/ui/components/CharacterCustomizer.java @@ -54,9 +54,9 @@ public class CharacterCustomizer { Globals.viewMatrix = CameraEntityUtils.getCameraViewMatrix(Globals.playerCamera); //create actor panel - Actor characterActor = ActorUtils.createActorFromModelPath(selectedRaceType.getModelPath()); + Actor characterActor = ActorUtils.createActorFromModelPath(selectedRaceType.getGraphicsTemplate().getModel().getPath()); ActorPanel actorPanel = ActorPanel.create(characterActor); - actorPanel.setAnimation(selectedRaceType.getIdleData().getAnimation().getNameThirdPerson()); + actorPanel.setAnimation(selectedRaceType.getGraphicsTemplate().getModel().getIdleData().getAnimation().getNameThirdPerson()); actorPanel.setPosition(new Vector3f(0,-0.5f,-0.6f)); actorPanel.setScale(new Vector3f(1.0f));