diff options
| author | tech kaczynski <tk@techkaczynski.dev> | 2026-10-19 01:47:08 +1000 |
|---|---|---|
| committer | tech kaczynski <tk@techkaczynski.dev> | 2026-10-19 01:47:08 +1000 |
| commit | edc50a43a0ab064472aa7fde90f14cf456d92076 (patch) | |
| tree | c0281123898ddfa2d94683cbcd4cd85dd0d6ad6b /physics.h | |
| parent | cc4ba95edf2927eda63af1aeb79a503bc6fe6182 (diff) | |
lots of editor work. Improved editor camera controls.
Diffstat (limited to 'physics.h')
| -rw-r--r-- | physics.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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; |
