feat: time_mul in camera controller now has a minimum value
This commit is contained in:
parent
4704f9ca7b
commit
91b73cb371
|
@ -41,7 +41,7 @@ void CameraControllerExitTree(CameraController *self) {}
|
|||
void CameraControllerTick(CameraController *self, double delta) {
|
||||
Transform current = self->transform.tc->get_global_transform(self->transform.data);
|
||||
Transform target = self->target.tc->get_global_transform(self->target.data);
|
||||
float const time_mul = fminf(1.f, powf(self->time_disjointed / self->max_speed_time, 0.8f));
|
||||
float const time_mul = fminf(1.f, fmaxf(0.1f, powf(self->time_disjointed / self->max_speed_time, 0.8f)));
|
||||
float const angle = QuaternionAngleDifference(current.rotation, target.rotation);
|
||||
float const step = self->rotation_speed * time_mul * delta;
|
||||
self->time_disjointed += delta;
|
||||
|
|
Loading…
Reference in a new issue