diff options
author | sanine <sanine.not@pm.me> | 2023-04-15 20:04:57 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-04-15 20:04:57 -0500 |
commit | 02c6f822e2cca41d5d28afd9f3a05211316587fd (patch) | |
tree | afb1fec88273f8fe123ae8750a75c146969f4d9a /honey/glm.lua | |
parent | e603997055259039cefcdceaece5604e3856e36d (diff) |
add collision system
Diffstat (limited to 'honey/glm.lua')
-rw-r--r-- | honey/glm.lua | 6 |
1 files changed, 6 insertions, 0 deletions
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) |