feat(physics): a walker (Jolt CharacterVirtual with an inner body) and the verbs a boat and a guest's copy need - force, torque, angular impulse, spin, set_pose

Five new tests: stand and walk at the asked speed, a low stone is a step and a tall one a wall, a
jump up and back, a crate shoved aside, a hull turned by a torque and carried by a force.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-27 00:24:47 +03:00
parent b44b88e00e
commit c7a18fd4f0
12 changed files with 334 additions and 2 deletions

View file

@ -31,3 +31,14 @@ extern function jph_top_at(w: pointer, x: float, z: float, r: float, from_y: flo
extern function jph_overlap(w: pointer, x: float, y: float, z: float, r: float, mask: int, ids: pointer, cap: int) -> int = "jph_overlap"
extern function jph_push(w: pointer, x: float, z: float, r: float, y0: float, y1: float, mask: int, out: pointer) -> int = "jph_push"
extern function jph_step_top(w: pointer, x: float, z: float, r: float, feet: float, reach: float, mask: int) -> float = "jph_step_top"
extern function jph_char_new(w: pointer, r: float, h: float, x: float, y: float, z: float, max_slope: float, mass: float) -> pointer = "jph_char_new"
extern function jph_char_free(k: pointer) -> void = "jph_char_free"
extern function jph_char_limits(k: pointer, step_up: float, stick: float) -> void = "jph_char_limits"
extern function jph_char_step(w: pointer, k: pointer, dt: float, vx: float, vz: float, jump: float) -> int = "jph_char_step"
extern function jph_char_read(k: pointer, out: pointer) -> void = "jph_char_read"
extern function jph_char_place(w: pointer, k: pointer, x: float, y: float, z: float) -> void = "jph_char_place"
extern function jph_body_force(w: pointer, id: int, x: float, y: float, z: float) -> void = "jph_body_force"
extern function jph_body_torque(w: pointer, id: int, x: float, y: float, z: float) -> void = "jph_body_torque"
extern function jph_body_angular_impulse(w: pointer, id: int, x: float, y: float, z: float) -> void = "jph_body_angular_impulse"
extern function jph_body_spin(w: pointer, id: int, out: pointer) -> void = "jph_body_spin"
extern function jph_body_set_pose(w: pointer, id: int, x: float, y: float, z: float, qx: float, qy: float, qz: float, qw: float, vx: float, vy: float, vz: float) -> void = "jph_body_set_pose"