]> git.localhorst.tv Git - blank.git/blobdiff - src/ui/ui.cpp
use "forces" for entity control and RK4 integrator
[blank.git] / src / ui / ui.cpp
index 6a48874116dea291e82dc22b0d8097a3df3c0fa8..96386195e57803c4aa8fcd498072caa229df768f 100644 (file)
@@ -86,7 +86,7 @@ void PlayerController::UpdatePlayer() noexcept {
        constexpr float max_vel = 0.005f;
        if (dirty) {
                player.GetEntity().Orientation(glm::quat(glm::vec3(pitch, yaw, 0.0f)));
-               player.GetEntity().Velocity(glm::rotateY(move_dir * max_vel, yaw));
+               player.GetEntity().TargetVelocity(glm::rotateY(move_dir * max_vel, yaw));
 
                Ray aim = player.Aim();
                if (!world.Intersection(aim, glm::mat4(1.0f), player.GetEntity().ChunkCoords(), aim_world)) {