mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Fix voice camera tilt from a top-down view
A voice fly-to frames a city top-down, at pitch -90. The tilt clamp rejected any step that left the pitch below -89, so the first frame of "tilt up" stopped the motion and "tilt down" was refused: from the view voice lands on, no tilt ever moved the camera. A bare "tilt the camera" also failed because tilt required a direction. - Clamp tilt only in the direction of travel, so -90 can tilt up. - Swing the camera about the ground under the crosshair, so the place stays centred and the heading is kept. A tracked view still tilts in place, and a pivot tilt yields when tracking takes the camera. - Add an optional move_camera pitchDeg for "tilt 45 degrees"; a tilt with neither angle nor direction settles at -45 (oblique view). - Re-derive the voice tool schema pins for the new argument and wording, and keep the Realtime prompt under its 52,000-character budget.
This commit is contained in:
1 parent
0e27d69fcc
commit
69152868e4
9 files changed
+403
-27
No files matched your search
@@ -49,7 +49,8 @@ test('the complete Realtime tool payload pins the manifest-generated layer relea
|
||||
// Snow leaves the set_visual_style enum.
|
||||
// The Operator HUD layout leaves set_hud's layout enum.
|
||||
// The layer alias hint leaves out aliases the layer id already spells.
|
||||
'dc2bac1be93a503dc88d637beea2f1bc457e1f9167422bd91548b44756a8aca5',
|
||||
// move_camera tilt takes an optional pitchDeg angle.
|
||||
'35261624ef8596608b80e2876f83760723ecf6592acc43fd77691cdb0a972608',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -134,6 +135,8 @@ test('all legacy action arguments are byte-identical after removing the delibera
|
||||
'stop',
|
||||
]);
|
||||
motion.enum = motion.enum.filter((value) => value !== 'rotate_globe');
|
||||
// Tilt to an angle is additive.
|
||||
delete property('move_camera').pitchDeg;
|
||||
const panels = property('set_panel_open').panelId;
|
||||
panels.enum = panels.enum.filter(
|
||||
(id) =>
|
||||
@@ -272,3 +275,12 @@ test('direct voice timeout schema accepts None and exact integers, rejects malfo
|
||||
for (const minutes of [-1, 61, 1.5, '5'])
|
||||
assert.ok(validateArgs(tool.parameters, { minutes }).length > 0);
|
||||
});
|
||||
|
||||
test('tilt accepts an angle with no direction', () => {
|
||||
const schema = GEV_ACTION_SCHEMAS.find(
|
||||
(tool) => tool.name === 'move_camera',
|
||||
).parameters;
|
||||
assert.deepEqual(validateArgs(schema, { motion: 'tilt', pitchDeg: -45 }), []);
|
||||
assert.deepEqual(validateArgs(schema, { motion: 'tilt' }), []);
|
||||
assert.ok(validateArgs(schema, { motion: 'tilt', pitchDeg: 120 }).length > 0);
|
||||
});
|
||||
Reference in new issue
Block a user