From edc50a43a0ab064472aa7fde90f14cf456d92076 Mon Sep 17 00:00:00 2001 From: tech kaczynski Date: Mon, 19 Oct 2026 01:47:08 +1000 Subject: lots of editor work. Improved editor camera controls. --- physics.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'physics.h') diff --git a/physics.h b/physics.h index 0a92118..5a9a8d0 100644 --- a/physics.h +++ b/physics.h @@ -96,9 +96,9 @@ typedef struct { /* physics joint fields meaning changes depending on their context. - anchor_a/axis_a are local to body_a. - anchor_b/axis_b are local to body_b. - axes should be normalized. + anchor_a/frame_rot_a define the joint frame local to body_a. + anchor_b/frame_rot_b define the joint frame local to body_b. + frame rotations are normalized quaternions. lower/upper are generic limits - revolute: radians @@ -129,7 +129,8 @@ typedef struct { Flags32 flags; Vec3 anchor_a, anchor_b; - Vec3 axis_a, axis_b; + Quaternion frame_rot_a, frame_rot_b; + // Vec3 axis_a, axis_b; f32 lower, upper; f32 spring_hz, spring_damping; @@ -137,6 +138,7 @@ typedef struct { } PhysicsJoint; typedef struct { + u64 entity_id; b3BodyId id; b3ShapeId *shapes; // count is stored in PhysicsCmp } PhysicsBodyRuntime; -- cgit v1.2.3