Second hamster (Parallax not working right again :c)
This commit is contained in:
parent
636a4bb003
commit
f8a3e2c102
16
models/space_humster_helmetless.mtl
Normal file
16
models/space_humster_helmetless.mtl
Normal file
@ -0,0 +1,16 @@
|
||||
# Blender MTL File: 'uploads_files_927450_space_humster.blend'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl humster
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.420000 0.420000 0.420000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd textures\\humster_BaseColor.png
|
||||
map_Ns textures\\humster_Roughness.png
|
||||
refl textures\\humster_Metallic.png
|
||||
bump textures\\humster_Height.png
|
149987
models/space_humster_helmetless.obj
Normal file
149987
models/space_humster_helmetless.obj
Normal file
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,7 @@ vec2 ParallaxMapping(vec2 texCoords, vec3 viewDir)
|
||||
// depth of current layer
|
||||
float currentLayerDepth = 0.0;
|
||||
// the amount to shift the texture coordinates per layer (from vector P)
|
||||
vec2 P = viewDir.xy / viewDir.z * 0.0001;
|
||||
vec2 P = viewDir.xy / viewDir.z * 0.00001;
|
||||
vec2 deltaTexCoords = P / numLayers;
|
||||
|
||||
// get initial values
|
||||
|
@ -119,6 +119,7 @@ std::shared_ptr<Model> sphere;
|
||||
std::shared_ptr<Model> corvette;
|
||||
std::shared_ptr<Model> asteroid;
|
||||
std::shared_ptr<Model> crewmate;
|
||||
std::shared_ptr<Model> hamster;
|
||||
|
||||
//asteroids
|
||||
GLuint bufferAsteroids;
|
||||
@ -819,6 +820,8 @@ void initPhysics()
|
||||
{
|
||||
if (obj.GetName() == "Space Humster")
|
||||
rectangleShape = pxScene.physics->createShape(PxBoxGeometry(0.3f, 0.3f, 0.3f), *material);
|
||||
if (obj.GetName() == "humster")
|
||||
rectangleShape = pxScene.physics->createShape(PxBoxGeometry(0.3f, 0.3f, 0.3f), *material);
|
||||
else if (obj.GetName() == "Corvette")
|
||||
rectangleShape = pxScene.physics->createShape(PxBoxGeometry(0.5f, 0.5f, 0.5f), *material);
|
||||
else rectangleShape = pxScene.physics->createShape(PxBoxGeometry(1, 1, 1), *material);
|
||||
@ -1047,6 +1050,10 @@ void initObjects()
|
||||
glm::vec3(-5, 0, 0), glm::vec3(1, 0, 1), glm::vec3(0.1), 0, true, false);
|
||||
objects.push_back(crewmateObj);
|
||||
|
||||
crewmateObj = Object("humster", hamster, programParallax, glm::vec3(1.0f),
|
||||
glm::vec3(5, 0, 5), glm::vec3(1, 0, 1), glm::vec3(0.1), 0, true, false);
|
||||
objects.push_back(crewmateObj);
|
||||
|
||||
//glm::mat4 shipModelMatrix = glm::translate(cameraPos + cameraDir * 0.7f + glm::vec3(0, -0.25f, 0)) * glm::rotate(-cameraAngle + glm::radians(90.0f), glm::vec3(0, 1, 0)) * glm::scale(glm::vec3(0.0001f));;
|
||||
Object ship = Object("Corvette", corvette, programParallax, glm::vec3(1.0f),
|
||||
cameraPos+glm::vec3(75,-0.3,50), glm::vec3(0, 1, 0), glm::vec3(0.0001f), 60, true, false);
|
||||
@ -1077,6 +1084,7 @@ void init()
|
||||
|
||||
corvette = std::make_shared<Model>("models/Corvette-F3.obj");
|
||||
crewmate = std::make_shared<Model>("models/space_humster.obj");
|
||||
hamster = std::make_shared<Model>("models/space_humster_helmetless.obj");
|
||||
asteroid = std::make_shared<Model>("models/Asteroid_X.obj");
|
||||
sphere = std::make_shared<Model>("models/sphere.obj");
|
||||
cube = std::make_shared<Model>("models/cube.obj");
|
||||
|
Loading…
Reference in New Issue
Block a user