Weird handle grip issue with the Pak40 and AT25

Ask questions, discuss ideas, get answers
Post Reply
Patito92
Posts: 5
Joined: Mon Mar 05, 2012 10:27 am
Location: Buenos Aires, Argentina.

Weird handle grip issue with the Pak40 and AT25

Post by Patito92 »

I've imported the Pak40 and AT25 to a map I'm developing, everything is as it should be except one thing.
When I traverse the gun, the soldier's left hand remains still while the right hand moves along with the wheel. I know I'm not being very clear, please excuse me as I'm not from an english speaking country. I'm talking about these lines of the Objects.con file:

Code: Select all

rem *** AT25HandleGrip1 ***
ObjectTemplate.create AnimatedBundle AT25HandleGrip1
ObjectTemplate.addSkeletonIK Bip01_L_Hand 0.07/0/0 0/0/0

rem *** AT25HandleGrip2 ***
ObjectTemplate.create AnimatedBundle AT25HandleGrip2
ObjectTemplate.addSkeletonIK Bip01_R_Hand 0.0/0.0/0.1 -90/-20/180
It's annoying, why the right hand works fine and the left doesn't? Please look at the complete Objects.con file and tell me if you see anything out of place:

Code: Select all

rem *** AT25 ***
ObjectTemplate.create PlayerControlObject AT25
ObjectTemplate.setNetworkableInfo AT25BodyInfo
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasArmor 1
ObjectTemplate.hitpoints 50
ObjectTemplate.maxhitpoints 50
ObjectTemplate.material 45
ObjectTemplate.addArmorEffect 35 e_AA-GunDamage 0/0.3/0
ObjectTemplate.addArmorEffect 0 e_ScrapAT25 0/1.2/0
ObjectTemplate.addArmorEffect 0 e_ScrapMetal 0/1.2/0
ObjectTemplate.aiTemplate AT25
ObjectTemplate.timetoliveafterdeath 0
ObjectTemplate.geometry AT25_Bottom_m1
rem -------------------------------------
ObjectTemplate.addTemplate AT25Entry
ObjectTemplate.addTemplate AT25Frame
ObjectTemplate.setPosition 0/-0.109/0
rem -------------------------------------
ObjectTemplate.setSoldierExitLocation -2/0.5/0 0/0/0
ObjectTemplate.GUIIndex 19
ObjectTemplate.setVehicleIcon "Vehicle/Icon_at25.tga"
ObjectTemplate.setVehicleIconPos 40/75
ObjectTemplate.setNumberOfWeaponIcons 1
ObjectTemplate.setPrimaryAmmoIcon "Ammo/Icon_cannon.tga"
ObjectTemplate.setPrimaryAmmoBar ABAmmoBarReloadBar
ObjectTemplate.setCrossHairType CHTIcon
ObjectTemplate.setVehicleCategory VCLand
ObjectTemplate.setVehicleType  VTATGun
ObjectTemplate.setToolTipType TTATGun
ObjectTemplate.setMinimapIcon "Minimap/minimap_icon_stationary_16x16.dds"



rem *** AT25Seat ***
ObjectTemplate.create SeatObject AT25Seat
ObjectTemplate.seatFlags c_SeatShowFullBodySoldier
ObjectTemplate.seatFlags c_SeatIsOutside


rem *** AT25Entry ***
ObjectTemplate.create EntryPoint AT25Entry
ObjectTemplate.setEntryRadius 3.2


rem *** AT25Camera ***
ObjectTemplate.create Camera AT25Camera
ObjectTemplate.setMaxSpeed 0/0/0
ObjectTemplate.setAcceleration 0/0/0


rem *** AT25Bottom ***
ObjectTemplate.create RotationalBundle AT25Bottom
ObjectTemplate.geometry AT25_Bottom_m1
ObjectTemplate.hasCollisionPhysics 1


rem *** AT25Frame ***
ObjectTemplate.create RotationalBundle AT25Frame
ObjectTemplate.geometry AT25_Frame_m1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.setNetworkableInfo AT25BodyInfo
rem --------------------------------------
ObjectTemplate.addTemplate AT25Slider
ObjectTemplate.setPosition 0.003/0.682/0.169
ObjectTemplate.addTemplate AT25Seat
ObjectTemplate.setPosition -0.65/0.435/-0.5
ObjectTemplate.addTemplate AT25Wheel1
ObjectTemplate.setPosition -1.058/0.048/-0.032
ObjectTemplate.addTemplate AT25Wheel2
ObjectTemplate.setPosition 1.066/0.048/-0.032
ObjectTemplate.addTemplate AT25Handle1
ObjectTemplate.setPosition -0.785/0.676/0.014
ObjectTemplate.setRotation 58/-126/40
ObjectTemplate.addTemplate AT25Handle2
ObjectTemplate.setPosition -0.54/0.756/-0.045
ObjectTemplate.setRotation 25.501/180/0
rem --------------------------------------
ObjectTemplate.setMinRotation -26/0/0
ObjectTemplate.setMaxRotation 26/0/0
ObjectTemplate.setMaxSpeed 20/0/0
ObjectTemplate.setAcceleration 1000/0/0
ObjectTemplate.setInputToYaw c_PIMouseLookX

rem *** AT25Slider ***
ObjectTemplate.create RotationalBundle AT25Slider
rem ObjectTemplate.geometry AT25_Slider_m1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.setNetworkableInfo AT25BodyInfo
ObjectTemplate.loadSoundScript Sounds/AT25GunBase.ssc
rem -------------------------------------
ObjectTemplate.addTemplate lodAT25Cockpit
ObjectTemplate.addTemplate AT25Camera
ObjectTemplate.setPosition -0.365/0.285/0.462
rem ObjectTemplate.setPosition -0.2/0.4/0.2
ObjectTemplate.addTemplate AT25Gun
rem -------------------------------------
ObjectTemplate.setMinRotation 0/-20/0
ObjectTemplate.setMaxRotation 0/12/0
ObjectTemplate.setMaxSpeed 0/20/0
ObjectTemplate.setAcceleration 0/1000/0
ObjectTemplate.setInputToPitch c_PIMouseLookY


rem *** AT25Wheel1 ***
ObjectTemplate.create RotationalBundle AT25Wheel1
ObjectTemplate.geometry AT25_Wheel1_m1
ObjectTemplate.setNetworkableInfo AT25BodyInfo
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.setMinRotation -26/0/0
ObjectTemplate.setMaxRotation 26/0/0
ObjectTemplate.setMaxSpeed 0/120/0
ObjectTemplate.setAcceleration 0/1000/0
ObjectTemplate.setInputToPitch c_PIMouseLookX
ObjectTemplate.loadSoundScript Sounds/AT25Carriage.ssc

rem *** AT25Wheel2 ***
ObjectTemplate.create RotationalBundle AT25Wheel2
ObjectTemplate.geometry AT25_Wheel2_m1
ObjectTemplate.setNetworkableInfo AT25BodyInfo
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.setMinRotation -26/0/0
ObjectTemplate.setMaxRotation 26/0/0
ObjectTemplate.setMaxSpeed 0/120/0
ObjectTemplate.setAcceleration 0/-1000/0
ObjectTemplate.setInputToPitch c_PIMouseLookX
ObjectTemplate.loadSoundScript Sounds/AT25Carriage.ssc

rem *** AT25Handle1 ***
ObjectTemplate.create RotationalBundle AT25Handle1
ObjectTemplate.geometry AT25_Ratt1_m1
ObjectTemplate.setNetworkableInfo AT25BodyInfo
rem -------------------------------------
ObjectTemplate.addTemplate AT25HandleGrip1
rem -------------------------------------
ObjectTemplate.setMaxSpeed 0/0/800
ObjectTemplate.setAcceleration 0/0/-3000
ObjectTemplate.setInputToRoll c_PIMouseLookX


rem *** AT25Handle2 ***
ObjectTemplate.create RotationalBundle AT25Handle2
ObjectTemplate.geometry AT25_Ratt2_m1
ObjectTemplate.setNetworkableInfo AT25BodyInfo
rem -------------------------------------
ObjectTemplate.addTemplate AT25HandleGrip2
rem -------------------------------------
ObjectTemplate.setMaxSpeed 0/0/800
ObjectTemplate.setAcceleration 0/0/-3000
ObjectTemplate.setInputToRoll c_PIMouseLookY


rem *** AT25HandleGrip1 ***
ObjectTemplate.create AnimatedBundle AT25HandleGrip1
ObjectTemplate.addSkeletonIK Bip01_L_Hand 0.07/0/0 0/0/0

rem *** AT25HandleGrip2 ***
ObjectTemplate.create AnimatedBundle AT25HandleGrip2
ObjectTemplate.addSkeletonIK Bip01_R_Hand 0.0/0.0/0.1 -90/-20/180

rem *** Flak38CockpitExternal ***
ObjectTemplate.create SimpleObject AT25CockpitExternal
ObjectTemplate.geometry AT25_Slider_m1
ObjectTemplate.hasCollisionPhysics 1


rem *** Flak38CockpitInternal ***
ObjectTemplate.create SimpleObject AT25CockpitInternal
ObjectTemplate.geometry AT25_1P


rem *** flak38CockpitSelector ***
LodSelectorTemplate.create DistCompareSelector AT25CockpitSelector
LodSelectorTemplate.addLodDistance 2
LodSelectorTemplate.addLodComparison 0.5


rem *** lodFlak38Cockpit ***
ObjectTemplate.create LodObject lodAT25Cockpit
rem -------------------------------------
ObjectTemplate.addTemplate AT25CockpitExternal
ObjectTemplate.addTemplate AT25CockpitInternal
ObjectTemplate.setPosition -0.11/-0.742/0.34
ObjectTemplate.setRotation 32/0/0
rem -------------------------------------
ObjectTemplate.lodSelector AT25CockpitSelector

rem - Tosses from Explosions.

rem *** AT25_Bottom_Toss ***
ObjectTemplate.create SimpleObject AT25_Bottom_Toss
ObjectTemplate.geometry AT25_Bottom_m1
ObjectTemplate.setHasResponsePhysics 1
ObjectTemplate.destroyed 1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.sinkInToLandAfterDeathSpeed 10

rem *** AT25_Cannon_Toss ***
ObjectTemplate.create SimpleObject AT25_Cannon_Toss
ObjectTemplate.geometry AT25_Cannon_m1
ObjectTemplate.setHasResponsePhysics 1
ObjectTemplate.destroyed 1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.sinkInToLandAfterDeathSpeed 10

rem *** AT25_Frame_Toss ***
ObjectTemplate.create SimpleObject AT25_Frame_Toss
ObjectTemplate.geometry AT25_Frame_m1
ObjectTemplate.setHasResponsePhysics 1
ObjectTemplate.destroyed 1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.sinkInToLandAfterDeathSpeed 10

rem *** AT25_Slider_Toss ***
ObjectTemplate.create SimpleObject AT25_Slider_Toss
ObjectTemplate.geometry AT25_Slider_m1
ObjectTemplate.setHasResponsePhysics 1
ObjectTemplate.destroyed 1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.sinkInToLandAfterDeathSpeed 10

rem *** AT25_Wheel1_Toss ***
ObjectTemplate.create SimpleObject AT25_Wheel1_Toss
ObjectTemplate.geometry AT25_Wheel1_m1
ObjectTemplate.setHasResponsePhysics 1
ObjectTemplate.destroyed 1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.sinkInToLandAfterDeathSpeed 10
Please help me, thank you :mrgreen:
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Weird handle grip issue with the Pak40 and AT25

Post by Swaffy »

It might have something to do with Animations. Have you tried that?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Patito92
Posts: 5
Joined: Mon Mar 05, 2012 10:27 am
Location: Buenos Aires, Argentina.

Re: Weird handle grip issue with the Pak40 and AT25

Post by Patito92 »

It's just that as far is I know handle grips are not animations, therefore no .ske is specified in the Objects.con file. It binds the soldier's hand to the rotational bundle.
Patito92
Posts: 5
Joined: Mon Mar 05, 2012 10:27 am
Location: Buenos Aires, Argentina.

Re: Weird handle grip issue with the Pak40 and AT25

Post by Patito92 »

I found the problem, it seems that the line "ObjectTemplate.addSkeletonIK" only works for objects that belong to the mod. When adding a custom object you have to use this lines instead:

Code: Select all

rem *** AT25HandleGrip1 ***
ObjectTemplate.create AnimatedBundle AT25HandleGrip1
rem ObjectTemplate.addSkeletonIK Bip01_L_Hand 0.07/0/0 0/0/0
ObjectTemplate.addTemplate Attach_L_Hand
ObjectTemplate.setPosition 0.07/0/0
ObjectTemplate.setRotation 0/0/0

rem *** AT25HandleGrip2 ***
ObjectTemplate.create AnimatedBundle AT25HandleGrip2
rem ObjectTemplate.addSkeletonIK Bip01_R_Hand 0.0/0.0/0.1 -90/-20/180
ObjectTemplate.addTemplate Attach_R_Hand
ObjectTemplate.setPosition 0/0/0.1
ObjectTemplate.setRotation -90/-20/180
I figured it out by looking at "The Great Pursuit" objects coding, my thanks to its creators.

Well I guess this one is solved. Thanks for your time ;)
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Weird handle grip issue with the Pak40 and AT25

Post by Swaffy »

Glad you found your problem, man. :)
Stuff can get frustrating sometimes.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply