From 0452ac51dac477f427ea0ed692c8495a979182ce Mon Sep 17 00:00:00 2001 From: LazyJazz Date: Sat, 30 Dec 2023 14:56:18 +0800 Subject: [PATCH] Update assets --- assets | 2 +- src/GameBall/core/game_ball.cpp | 3 +++ src/GameBall/logic/units/regular_ball.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/assets b/assets index 622f17b..a1d3d14 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 622f17b6e32dd2b51b78feb08d1bf75eaf89f28a +Subproject commit a1d3d149aadcee48d6ab6d80736475a803279587 diff --git a/src/GameBall/core/game_ball.cpp b/src/GameBall/core/game_ball.cpp index 2a7adf0..a63ef06 100644 --- a/src/GameBall/core/game_ball.cpp +++ b/src/GameBall/core/game_ball.cpp @@ -36,8 +36,11 @@ void GameBall::OnInit() { directional_light_->SetLight(glm::vec3{1.0f}, glm::vec3{3.0f, 2.0f, 1.0f}); auto primary_player = world->CreatePlayer(); + auto enemy_player = world->CreatePlayer(); auto primary_unit = world->CreateUnit( primary_player->PlayerId(), glm::vec3{0.0f, 1.0f, 0.0f}, 1.0f, 1.0f); + auto enemy_unit = world->CreateUnit( + enemy_player->PlayerId(), glm::vec3{-5.0f, 1.0f, 0.0f}, 1.0f, 1.0f); auto primary_obstacle = world->CreateObstacle( glm::vec3{0.0f, -10.0f, 0.0f}, std::numeric_limits::infinity(), false, 20.0f); diff --git a/src/GameBall/logic/units/regular_ball.cpp b/src/GameBall/logic/units/regular_ball.cpp index 5f0db66..374f40a 100644 --- a/src/GameBall/logic/units/regular_ball.cpp +++ b/src/GameBall/logic/units/regular_ball.cpp @@ -21,7 +21,7 @@ RegularBall::RegularBall(World *world, sphere.orientation = orientation_; sphere.velocity = velocity_; sphere.angular_velocity = glm::vec3{0.0f}; - sphere.elasticity = 0.5f; + sphere.elasticity = 0.0f; sphere.friction = 0.5f; sphere.gravity = glm::vec3{0.0f, -9.8f, 0.0f}; }