0
$\begingroup$

Hey blender stackexchange, I am working on a remake of a game called Assaultcube, and want to use an original gun model as a reference. I found is in usr/lib/games/assaultcube/packages/models/weapons/assault/world/tris.md2. I used a md2 to .3ds converter (there was no direct md2 to blend converter I could find) and imported it to blender. I used Shift + Ctrl + Alt + C and set the origin to geometry and set the object's location to 0,0,0. However, the gun is at a weird angle. I want the gun to be perfectly snapped to all 3 axises, but I'm not sure how. Could someone please assist me? Thanks. Here's the blend file, I hope google drive works: https://drive.google.com/file/d/0B6smClKpjHImOWdvVFRJT3JVSTg/view?usp=sharing

$\endgroup$
  • $\begingroup$ Have the objects the transfrormations applied? $\endgroup$ – Paul Gonet Aug 17 '17 at 23:14
  • $\begingroup$ The rotations are all set to 0,0,0 $\endgroup$ – Philip KP Aug 17 '17 at 23:19
  • $\begingroup$ I edited your file and I fixed and applied the rotations. drive.google.com/open?id=0B2r6fqaHYyfuclNDdmFDLXNuODQ I hope it is good enough. Bye. $\endgroup$ – Leonardo Nascimento Aug 17 '17 at 23:38
  • $\begingroup$ Thanks so much! Could you please tell me what you did (there are 4 more models)? Thanks a lot either way :) $\endgroup$ – Philip KP Aug 17 '17 at 23:44
  • $\begingroup$ Ok. I switched to front view (1), side view (3), top view(7) and rotate it manually. After that I used Apply (ctrl A) rotate and location. $\endgroup$ – Leonardo Nascimento Aug 17 '17 at 23:46
1
$\begingroup$

While it is not a solution all on its own, How do I construct a transformation matrix from 3 vertices? shows how to create a matrix from 3 points. You would have to get the coordinates of 3 points (and the first 2 you would pick to match one of the axes; The third you would want to chose such that when combined with the other two defines one of the planes.)

Then you would need to take the inverse of that matrix and apply it to the matrix_world of your model. Then it should align the model with the world axes.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.