From 478c90e39838da30338d5e03e530f8f4666adcf7 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Fri, 30 Jan 2026 13:45:20 -0800 Subject: [PATCH] Something is off in my vector calculations --- html/images/space.svg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/html/images/space.svg b/html/images/space.svg index df5be83..60d7f10 100644 --- a/html/images/space.svg +++ b/html/images/space.svg @@ -767,7 +767,9 @@ const Move = (() => { const side = isClockwise([contact.edge.xa, contact.edge.ya], [contact.edge.xb, contact.edge.yb], [px, py]); // contact.velocity = { x: prVonNx, y: prVonNy }; - Velocity[entity_id] = { x: -prVonNx, y: -prVonNy }; + // Velocity[entity_id] = { x: prVonNx, y: prVonNy }; + Velocity[entity_id] = { x: v.x + prVonNx, y: v.y + prVonNy }; + console.log("v", v); console.log("velocity", Velocity[entity_id]); console.log("current position", px, py);