Merge pull request #676 from jmiskovic/add/vec3_from_quat

Initialize vec3 from quat
This commit is contained in:
Bjorn 2023-06-22 15:48:11 -07:00 committed by GitHub
commit 9c56c41b03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -609,6 +609,8 @@ int l_lovrVec3Set(lua_State* L) {
vec3_init(v, p);
} else if (p && t == V_MAT4) {
vec3_set(v, p[12], p[13], p[14]);
} else if (p && t == V_QUAT) {
quat_getDirection(p, v);
} else{
luax_typeerror(L, 2, "vec3, mat4, or number");
}