Add tree
This commit is contained in:
parent
05eefc9c45
commit
beac110bc6
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,4 +4,5 @@
|
||||
/src/main/resources/Config/localconfig.json
|
||||
/src/main/resources/Config/keybinds.json
|
||||
|
||||
/Telephone-*.jar
|
||||
/Telephone-*.jar
|
||||
/hs_err_pid*
|
||||
@ -40,7 +40,7 @@ public class EntityUtils {
|
||||
rVal.putData(EntityDataStrings.DATA_STRING_ACTOR, ActorUtils.createActorFromModelPath(modelPath));
|
||||
// rVal.putData(EntityDataStrings.DATA_STRING_MODEL_PATH, modelPath);
|
||||
rVal.putData(EntityDataStrings.DATA_STRING_POSITION, new Vector3f(0,0,0));
|
||||
rVal.putData(EntityDataStrings.DATA_STRING_ROTATION, new Quaternionf().rotateAxis((float)0, new Vector3f(1,0,0)));
|
||||
rVal.putData(EntityDataStrings.DATA_STRING_ROTATION, new Quaternionf().identity());
|
||||
rVal.putData(EntityDataStrings.DATA_STRING_SCALE, new Vector3f(1,1,1));
|
||||
Globals.entityManager.registerEntity(rVal);
|
||||
Globals.entityManager.registerDrawableEntity(rVal);
|
||||
|
||||
@ -381,6 +381,15 @@ public class LoadingThread extends Thread {
|
||||
// EntityUtils.getEntityScale(creature).set(0.01f);
|
||||
// }
|
||||
|
||||
|
||||
for(int i = 0; i < 50; i++){
|
||||
Random rand = new Random();
|
||||
String treePath = "Models/tree1.fbx";
|
||||
Entity tree = EntityUtils.spawnDrawableEntity(treePath);
|
||||
EntityUtils.getEntityPosition(tree).set(rand.nextFloat() * 150 + 10, 0, rand.nextFloat() * 150 + 10);
|
||||
// EntityUtils.getEntityRotation(tree).rotateAxis((float)-Math.PI/2.0f, new Vector3f(1,0,0));
|
||||
}
|
||||
|
||||
Entity sword = ItemUtils.spawnBasicItem(2);
|
||||
Entity testHomie = CreatureUtils.spawnBasicCreature(0, 0.1f, 0.5f);
|
||||
EntityUtils.getEntityScale(testHomie).set(0.005f);
|
||||
|
||||
BIN
src/main/resources/Models/tree1.fbx
Normal file
BIN
src/main/resources/Models/tree1.fbx
Normal file
Binary file not shown.
BIN
src/main/resources/Textures/Branch.png
Normal file
BIN
src/main/resources/Textures/Branch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 937 KiB |
@ -35,6 +35,16 @@
|
||||
"Textures/katana1.png",
|
||||
"Textures/katana1.png"
|
||||
]
|
||||
},
|
||||
"Models/tree1.fbx": {
|
||||
"Cube.002": [
|
||||
"Textures/Branch.png",
|
||||
"Textures/Branch.png"
|
||||
],
|
||||
"Cylinder": [
|
||||
"Textures/Branch.png",
|
||||
"Textures/Branch.png"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user