Improve controls

This commit is contained in:
2026-03-14 20:33:13 -03:00
parent d8dace3efa
commit 7e90f2ea57
4 changed files with 12 additions and 8 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ export class CollisionCuboid extends Component {
colliding_y: number = 0;
colliding_z: number = 0;
constructor(width: number, height: number, depth: number, gravity = -9.8) {
constructor(width: number, height: number, depth: number, gravity = -15.8) {
super();
this.width = width;
this.height = height;
+3 -1
View File
@@ -2,13 +2,15 @@ import { Component } from "$/common/ecs/mod.ts";
import { KeyCode } from "$/client/input_manager.ts";
export class PlayerControls extends Component {
move_speed: number = 5;
move_speed = 4;
jump_force = 6.7;
// Keys
move_forward: KeyCode = "KeyW";
move_backwards: KeyCode = "KeyS";
move_left: KeyCode = "KeyA";
move_right: KeyCode = "KeyD";
sprint_key: KeyCode = "ShiftLeft";
hotbar_1: KeyCode = "Digit1";
hotbar_2: KeyCode = "Digit2";