mirror of https://github.com/bjornbytes/lovr.git
Merge pull request #676 from jmiskovic/add/vec3_from_quat
Initialize vec3 from quat
This commit is contained in:
commit
9c56c41b03
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue