another deltatime fix
This commit is contained in:
parent
d54de1fbf5
commit
2205fda141
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ struct v3f control_handler(double cx, double cy, vec3 pos, vec3 dir_temp,
|
|||
double delta = glfwGetTime();
|
||||
if (delta > 1/60.0) delta = 1/60.0;
|
||||
glfwSetTime(0);
|
||||
delta *= 20;
|
||||
delta *= 30;
|
||||
vec3 direction = {cosf(cy) * sinf(cx), sinf(cy), cosf(cy) * cosf(cx)};
|
||||
vec3 right = {sinf(cx - 3.14f / 2.0f) * 0.015 * delta, 0,
|
||||
cosf(cx - 3.14f / 2.0f) * 0.015 * delta};
|
||||
|
@ -96,7 +96,7 @@ struct v3f control_handler(double cx, double cy, vec3 pos, vec3 dir_temp,
|
|||
}
|
||||
|
||||
if (glfwGetKey(window, GLFW_KEY_SPACE) == GLFW_PRESS) {
|
||||
dir_temp[1] = 0.5;
|
||||
dir_temp[1] = 0.5 * delta;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue