Skip to content

Add Box3D physics for dynamic objects - #1307

Draft
kristiker wants to merge 1 commit into
ValveResourceFormat:masterfrom
kristiker:box3d
Draft

Add Box3D physics for dynamic objects#1307
kristiker wants to merge 1 commit into
ValveResourceFormat:masterfrom
kristiker:box3d

Conversation

@kristiker

@kristiker kristiker commented Aug 16, 2026

Copy link
Copy Markdown
Member
Source2Viewer_SC4NTT8INW.mp4

Simulates prop_physics / prop_physics_multiplayer / prop_physics_override
through Box3D.NET: world_physics is pushed as a static compound shape,
props become dynamic bodies built from their spheres, capsules and hulls,
and the entity tick steps the world at 64 Hz.

The player shoves props through a kinematic hull body (soft collision
only, props never block movement), and E picks up the prop under the
crosshair: rigid velocity tracking holds it centered on the mass center
in front of the eyes, glued to the view per frame while unblocked, with
a smooth attach glide and full velocity inheritance on release.

Friction, elasticity, density and impact sounds are data driven from
surfaceproperties.vsurf, matched hash-to-hash with each shape's surface
property and played off Box3D contact hit events.
@github-actions github-actions Bot added the Renderer Related to the 3D/2D rendering viewer label Aug 16, 2026
@kristiker
kristiker marked this pull request as draft August 17, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Renderer Related to the 3D/2D rendering viewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant