NeonTiger Posted February 6, 2019 Posted February 6, 2019 Just a useful function for vector math. Drop it at the bottom of mathTypes.cppDefineConsoleFunction(createOrientFromDir, const char*, ( VectorF vec),,"Returns orientation from a vector input") { MatrixF mat = MathUtils::createOrientFromDir(vec); AngAxisF aa(mat); char* ret = Con::getReturnBuffer(256); dSprintf(ret, 255, "%g %g %g %g", aa.axis.x, aa.axis.y, aa.axis.z, aa.angle); return ret; } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.