last onewfds
This commit is contained in:
+4
-3
@@ -128,7 +128,6 @@ void Engine::Initiate()
|
||||
// ------------------------------------------------------------------------
|
||||
Font* arial = new Font("assets/ft/arial.ttf");
|
||||
Texture* blanktex = new Texture("assets/blanktexture.png");
|
||||
Texture* blacktex = new Texture("assets/blacktexture.png");
|
||||
Texture* magic = new Texture("assets/itsmagicbitch.jpg");
|
||||
Texture* snowflake = new Texture("assets/snowflake.png");
|
||||
Texture* shockwavetex = new Texture("assets/shockwave.png");
|
||||
@@ -472,7 +471,8 @@ void Engine::Initiate()
|
||||
glm::vec3 grappleLineEnd(0.0f);
|
||||
Mesh* grappleLine = CreateCubeMesh();
|
||||
grappleLine->name = "grappleline";
|
||||
grappleLine->meshTexture = blacktex;
|
||||
grappleLine->meshTexture = blanktex;
|
||||
grappleLine->colorOverride = glm::vec4(0.0f, 0.0f, 0.0f, 1.0f); // black
|
||||
grappleLine->t.TranslateTo({ 0.0f, -1000.0f, 0.0f }); // hidden until a grapple latches
|
||||
grappleLine->BindToRenderSystem();
|
||||
mainf->AddChild(grappleLine);
|
||||
@@ -1034,7 +1034,8 @@ void Engine::Initiate()
|
||||
if (len > 0.01f) {
|
||||
grappleLine->t.TranslateTo(handPos + delta * 0.5f);
|
||||
grappleLine->t.ScaleTo({ 0.05f, 0.05f, len });
|
||||
grappleLine->t.RotateToQuaternion(LookAt(delta));
|
||||
// Plain shortest-arc rotation of the box's long (z) axis onto the rope; LookAt breaks on straight up/down
|
||||
grappleLine->t.RotateToQuaternion(RotationBetweenVectors(glm::vec3(0.0f, 0.0f, 1.0f), delta));
|
||||
}
|
||||
}
|
||||
else grappleLine->t.TranslateTo(hiddenPos);
|
||||
|
||||
Reference in New Issue
Block a user