Fix skybox tracking potentially
This commit is contained in:
parent
b5743b3a1f
commit
45e28e5568
@ -29,6 +29,6 @@ void main()
|
|||||||
//send color to the frag shader
|
//send color to the frag shader
|
||||||
color = colors[int(id)];
|
color = colors[int(id)];
|
||||||
//set final position with opengl space
|
//set final position with opengl space
|
||||||
vec4 pos = projection * view * FinalVertex;
|
vec4 pos = projection * view * model * FinalVertex;
|
||||||
gl_Position = pos.xyww;
|
gl_Position = pos.xyww;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -423,8 +423,7 @@ public class LoadingThread extends Thread {
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
Model skyboxModel = Globals.assetManager.fetchModel(AssetDataStrings.ASSET_STRING_SKYBOX_BASIC);
|
Model skyboxModel = Globals.assetManager.fetchModel(AssetDataStrings.ASSET_STRING_SKYBOX_BASIC);
|
||||||
Entity skyboxEntity = EntityUtils.spawnDrawableEntity(AssetDataStrings.ASSET_STRING_SKYBOX_BASIC);
|
Globals.skybox = EntityUtils.spawnDrawableEntity(AssetDataStrings.ASSET_STRING_SKYBOX_BASIC);
|
||||||
EntityUtils.getScale(skyboxEntity).mul(100);
|
|
||||||
|
|
||||||
|
|
||||||
Globals.skyboxColors.add(new Vector3f(100,150,200));
|
Globals.skyboxColors.add(new Vector3f(100,150,200));
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
package electrosphere.game.client;
|
package electrosphere.game.client;
|
||||||
|
|
||||||
|
import electrosphere.entity.CameraEntityUtils;
|
||||||
|
import electrosphere.entity.EntityUtils;
|
||||||
import electrosphere.main.Globals;
|
import electrosphere.main.Globals;
|
||||||
|
import org.joml.Vector3f;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -12,5 +15,18 @@ public class ClientFunctions {
|
|||||||
Globals.clientTerrainManager.handleMessages();
|
Globals.clientTerrainManager.handleMessages();
|
||||||
Globals.clientTerrainManager.ejectLoadedChunks();
|
Globals.clientTerrainManager.ejectLoadedChunks();
|
||||||
}
|
}
|
||||||
|
updateSkyboxPos();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void updateSkyboxPos(){
|
||||||
|
if(Globals.skybox != null){
|
||||||
|
// Vector3f skyboxPos = EntityUtils.getPosition(Globals.skybox);
|
||||||
|
//
|
||||||
|
// Vector3f playerCameraPos = EntityUtils.getPosition(Globals.playerCamera);
|
||||||
|
// if(skyboxPos != null && playerCameraPos != null){
|
||||||
|
// skyboxPos.set(playerCameraPos);
|
||||||
|
// }
|
||||||
|
EntityUtils.getPosition(Globals.skybox).set(EntityUtils.getPosition(Globals.playerCharacter)).mul(0.01f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,9 +43,9 @@ public class DrawCellManager {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int drawRadius = 35;
|
int drawRadius = 5;
|
||||||
int drawStepdownInterval = 3;
|
int drawStepdownInterval = 3;
|
||||||
int drawStepdownValue = 9;
|
int drawStepdownValue = 25;
|
||||||
|
|
||||||
int physicsRadius = 3;
|
int physicsRadius = 3;
|
||||||
|
|
||||||
|
|||||||
@ -226,6 +226,9 @@ public class Globals {
|
|||||||
//the creature the player camera will orbit and will receive controlHandler movementTree updates
|
//the creature the player camera will orbit and will receive controlHandler movementTree updates
|
||||||
public static Entity playerCharacter;
|
public static Entity playerCharacter;
|
||||||
|
|
||||||
|
//skybox entity
|
||||||
|
public static Entity skybox;
|
||||||
|
|
||||||
|
|
||||||
//ai manager
|
//ai manager
|
||||||
public static AIManager aiManager;
|
public static AIManager aiManager;
|
||||||
|
|||||||
@ -278,14 +278,14 @@ public class RenderUtils {
|
|||||||
|
|
||||||
|
|
||||||
float[] vertexcoords = {
|
float[] vertexcoords = {
|
||||||
1.0f,1.0f,1.0f,
|
100.0f, 100.0f, 100.0f,
|
||||||
1.0f,1.0f,-1.0f,
|
100.0f, 100.0f,-100.0f,
|
||||||
1.0f,-1.0f,1.0f,
|
100.0f,-100.0f, 100.0f,
|
||||||
1.0f,-1.0f,-1.0f,
|
100.0f,-100.0f,-100.0f,
|
||||||
-1.0f,1.0f,1.0f,
|
-100.0f, 100.0f, 100.0f,
|
||||||
-1.0f,1.0f,-1.0f,
|
-100.0f, 100.0f,-100.0f,
|
||||||
-1.0f,-1.0f,1.0f,
|
-100.0f,-100.0f, 100.0f,
|
||||||
-1.0f,-1.0f,-1.0f,
|
-100.0f,-100.0f,-100.0f,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user