From ecdeed125c0fe00b6a90f85db44ad37f0913e992 Mon Sep 17 00:00:00 2001 From: rodri Date: Sun, 16 Jun 2024 09:57:11 +0000 Subject: vis,med: make qball rotations position-independent. the camera no longer needs to be on the first quadrant for the qball to work. --- vis.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 84987df..ce45b0c 100644 --- a/vis.c +++ b/vis.c @@ -569,9 +569,9 @@ lmb(void) Δorient = mulq(orient, invq(Δorient)); for(e = scene->ents.next; e != &scene->ents; e = e->next){ - e->bx = Vecquat(mulq(mulq(Δorient, Quatvec(0, e->bx)), invq(Δorient))); - e->by = Vecquat(mulq(mulq(Δorient, Quatvec(0, e->by)), invq(Δorient))); - e->bz = Vecquat(mulq(mulq(Δorient, Quatvec(0, e->bz)), invq(Δorient))); + e->bx = vcs2world(maincam, Vecquat(mulq(mulq(Δorient, Quatvec(0, world2vcs(maincam, e->bx))), invq(Δorient)))); + e->by = vcs2world(maincam, Vecquat(mulq(mulq(Δorient, Quatvec(0, world2vcs(maincam, e->by))), invq(Δorient)))); + e->bz = vcs2world(maincam, Vecquat(mulq(mulq(Δorient, Quatvec(0, world2vcs(maincam, e->bz))), invq(Δorient)))); } }else{ Framebuf *fb; -- cgit v1.2.3