After tinkering with ToolBox and MCP for a day or two, I finally learned how to import 3D gun models to Minecraft. But, I have encountered two issues with my first model, which is a modified P90 from the Monolith pack that has been made to resemble the RCP-90 from GoldenEye N64 (which I am trying to make a content pack for). The first issue is that some of the smaller shapeboxes located on the gun handle aren't rendering properly in the game. I tested for this by giving a Custom NPC my gun and telling it to stand still and aim so I can see what the model looks like, and secondly by placing it on a CustomNPCs weapons rack, where it looked even worse. I know that other guns work properly with this mod, so I am led to believe that it is my model that is screwed up. The second issue is the reload animation, which needs to be realigned, but unfortunately I don't know how to do this, so please teach me so I don't have to bug you all again. I've got my Toolbox model file, Java source file, and content pack attached. Any assistance on either of these two issues would be quite appreciated.
Thanks for your help thus far. I set it to the P90 animation before, but perhaps the model file didn't have that set up. I didn't know how to set it up in Toolbox, so I copied that line of code from the original Java source file. Oops. But, when I did set it up like you told me to do, and then used Show > Model Animation to see the animation, it doesn't do anything. Does this feature work at all for you, am I doing it wrong, or do I have to recompile my gun, run Minecraft, and unload 80 rounds of ammo every time I need to make an adjustment?
Apparently I wasn't too clear in my earlier post. I set up the animation config in Toolbox (which was indeed missing from the .mtb file I uploaded, but was included in the Java file after I copied and pasted "animationType = EnumAnimationType.P90" from the source file of the gun I was modifying in the first place), updated the model file, and enabled Show > Model Animation in Toolbox, and no animation playback occurred, which means, until this problem is fixed, I have to recompile the gun and play the reload animation in Minecraft on a trial and error basis until I get it right, which would be a pain in the neck... Perhaps it would help if you uploaded the model you have.
Thank you SO much, your videos were indispensable. My gun is almost complete thanks to your help, and now I feel like I know what I'm doing. However, there's one last issue: when setting up my animation, there's this weird glitch where the gun would go past the starting position the same distance it traveled when reloading, and then abruptly snap back to its starting position. Does anything seem glaringly wrong to you in my code, or is Flan's Mod messing this one up?
[ Click to expand ]
[ Click to hide ]
animationType = EnumAnimationType.CUSTOM;
tiltGunTime = 0.2F;
loadClipTime = 0.2F;
unloadClipTime = 0.2F;
untiltGunTime = 0.2F;
tiltGun = 15F;
tiltClip = 15F;
rotateClipVertical = -15F;
rotateGunHorizontal = 45F;
translateGun = new Vector3f(2F /16F, 2F /16F, 4F /16F);
translateClip = new Vector3f(-220F /16F, 9F /16F, 0F /16F);
Set these ones to 0.25F instead.
These 4 should always add up to one; since this adds up to 0.8, the animation finishes before the reload time is finished, hence why it "snaps" back to starting position.