fix(physics): push keeps the old collider contract exactly - a thing wholly under the feet or over the head is not in the way, anything else pushes out sideways (Jolt's axis when side-on, else radially by the overlap across)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
28c54e4b39
commit
d4fc9bbb91
6 changed files with 36 additions and 15 deletions
|
|
@ -75,7 +75,8 @@ export function phys_push(physics_st: mut PhysicsState, x: float, z: float, r: f
|
|||
|
||||
# a body r wide from y0 to y1 at (x, z) moved clear of what it stands in, two passes over (a push out
|
||||
# of one thing can put it into another); true when it moved, the place in phys_resolved_x / _z -
|
||||
# what CharacterGround.push and pushed_x / _z ask
|
||||
# what CharacterGround.push and pushed_x / _z ask. A thing wholly below y0 or above y1 is not in
|
||||
# the way
|
||||
export function phys_resolve(physics_st: mut PhysicsState, x: float, z: float, r: float, y0: float, y1: float, mask: int) -> bool {
|
||||
var px = x
|
||||
var pz = z
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue