Posted by: eldrone
« on: Today at 10:26:17 »And essentially the setup for making animations as it is now would be adding a .nut with this in it:
Code: [Select]
// Add the 'Shotgun' category
g_weaponAnimations["Shotgun"] <- {};
//============================================================================================================
// shoot
//============================================================================================================
g_weaponAnimations["Shotgun"]["shoot"] <- NDPointRigAnimation("shoot", 30, 100, {
// Weapon
"weaponModel" : [
{ "frame":0, "pos":[0.0, 0.0, 0.0], "rot":[0.0, 0.0, 0.0] },
{ "frame":2, "pos":[-1.5, 0.0, 0.0], "rot":[0.0, -4.0, 0.0] },
{ "frame":16, "pos":[0.0, 0.0, 0.0], "rot":[0.0, 0.0, 0.0] },
{ "frame":22, "pos":[-0.3, 0.3, 0.0], "rot":[20.0, -15.0, -30.0] },
{ "frame":28, "pos":[-0.3, 0.3, 0.0], "rot":[18.0, -15.0, -30.0] },
{ "frame":48, "pos":[0.0, 0.0, 0.0], "rot":[0.0, 0.0, 0.0] },
],
// shotgun pump
"joint1" : [
{ "frame":0, "pos":[0.0, 0.0, 0.0], "rot":[0.0, 0.0, 0.0] },
{ "frame":20, "pos":[0.0, 0.0, 0.0], "rot":[0.0, 0.0, 0.0] },
{ "frame":23, "pos":[-0.6, 0.0, 0.0], "rot":[0.0, 0.0, 0.0] },
{ "frame":26, "pos":[-0.6, 0.0, 0.0], "rot":[0.0, 0.0, 0.0] },
{ "frame":29, "pos":[0.0, 0.0, 0.0], "rot":[0.0, 0.0, 0.0] },
{ "frame":99, "pos":[0.0, 0.0, 0.0], "rot":[0.0, 0.0, 0.0] },
],
});