Friction, velocity, rendering

This commit is contained in:
2025-10-09 09:44:17 -05:00
parent c31bcf7f6a
commit 7622f81309
7 changed files with 93 additions and 75 deletions

View File

@@ -63,6 +63,7 @@ void cameraPushMatrix(camera_t *camera) {
);
break;
case CAMERA_PROJECTION_TYPE_PERSPECTIVE_FLIPPED:
case CAMERA_PROJECTION_TYPE_PERSPECTIVE:
const float_t aspect = (
(float_t)frameBufferGetWidth(FRAMEBUFFER_BOUND) /
@@ -75,6 +76,12 @@ void cameraPushMatrix(camera_t *camera) {
camera->farClip,
projection
);
if(camera->projType == CAMERA_PROJECTION_TYPE_PERSPECTIVE_FLIPPED) {
// Flip Y axis
projection[1][1] *= -1;
}
break;
}
switch(camera->viewType) {

View File

@@ -13,6 +13,7 @@
typedef enum {
CAMERA_PROJECTION_TYPE_PERSPECTIVE,
CAMERA_PROJECTION_TYPE_PERSPECTIVE_FLIPPED,
CAMERA_PROJECTION_TYPE_ORTHOGRAPHIC
} cameraprojectiontype_t;