From 02c6f822e2cca41d5d28afd9f3a05211316587fd Mon Sep 17 00:00:00 2001 From: sanine Date: Sat, 15 Apr 2023 20:04:57 -0500 Subject: add collision system --- honey/glm.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'honey/glm.lua') diff --git a/honey/glm.lua b/honey/glm.lua index 3357815..c950b9a 100644 --- a/honey/glm.lua +++ b/honey/glm.lua @@ -167,6 +167,7 @@ end function Vec3.normalize(self) glm.vec3_normalize(self.data) + return self end function Vec3.normalizeTo(self, dest) glm.vec3_normalize_to(self.data, dest.data) @@ -288,6 +289,11 @@ function Mat4.mul(self, other) glm.mat4_mul(self.data, other.data, self.data) return self end +function Mat4.mulv3(self, v) + local dest = Vec3() + glm.mat4_mulv3(self.data, v.data, 1.0, dest.data) + return dest +end function Mat4.translate(self, vec) -- cgit v1.2.1