adambeer Posted February 16, 2015 Share Posted February 16, 2015 Im trying to align a building properly on a sphere surface and am having trouble with the code behind it. I know the ProxMine does something like this when its deployed, but thats in source code. I looked there and cant seem to figure out the script conversion. Heres whats in source: // Align to deployed surface normal MatrixF mat( true ); MathUtils::getMatrixFromUpVector( normal, &mat ); mat.setPosition( pos + normal * mObjBox.minExtents.z ); delta.pos = pos; delta.posVec.set(0, 0, 0); ShapeBase::setTransform( mat ); Anyone have any ideas on how to do this? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.