Skip to content

Commit c3cd49a

Browse files
committed
fix: clampping y as well as x
1 parent 55b5777 commit c3cd49a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

noengine-cpp-sdl2/src/system_impls.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ auto example::PhysicsParent::Physics::impl(context& ctx) -> void {
8383
}
8484

8585
vel.y = std::clamp(vel.y, -terminal_velocity, terminal_velocity);
86-
vel.y = std::clamp(vel.y, -terminal_velocity, terminal_velocity);
86+
vel.x = std::clamp(vel.x, -terminal_velocity, terminal_velocity);
8787

8888
ctx.update(vel);
8989
}

0 commit comments

Comments
 (0)