Finished camera controller.

This commit is contained in:
2023-03-21 20:52:17 -07:00
parent 2bd6012297
commit 807f78fcda
9 changed files with 92 additions and 53 deletions

View File

@ -59,6 +59,8 @@ void CharacterController2D::onStart() {
}
}
if(mathAbs<float_t>(moveAmount.x) <= 0.001f && mathAbs<float_t>(moveAmount.y) <= 0.001f) return;
transform->setLocalPosition(
transform->getLocalPosition() + (glm::vec3(moveAmount.x, 0, moveAmount.y) * delta)
);