• Help for Physics
    4 replies, posted
I am quite new to modelling with Garry's Mod and have copied the skeleton and mesh of another model and tried to re-texture it. However, to do this, I must edit the QC file. When decompiling the model, it is all fine. However when trying to compile the QC file again, there is an error. It states: [I]ERROR: Rotation constraint on bone "ValveBiped.Bip01_Pelvis" which has no parent!!![/I] [B](I have only changed the name of the model and the texture location; nothing else)[/B] I have found a way to bypass this; assigning the root bone of the physics as the "ValveBiped.Bip01_Pelvis." consequently (I believe) The physics model begins to collide with the model and the model, in game, does not move by will, apart from one arm and the body. The rest of the model is not "selectable" from the physics gun. When editing the bones in game, the legs and other arm move fine. Does anyone know what this problem is and how to fix it? Thanks. The QC file looks like this(from the AWOI addon): [CODE]// Created by Crowbar 0.35.0.0 $ModelName "private_1st_foot_guards.mdl" $BodyGroup "body" { studio "npc_awoi_pri_body_new_private.smd" } $BodyGroup "hands" { studio "npc_awoi_pri_hands.smd" } $BodyGroup "head" { studio "npc_head_01.smd" studio "npc_head_02.smd" studio "npc_head_03.smd" studio "npc_head_04.smd" } $BodyGroup "backpack" { blank studio "npc_awoi_pri_backpack.smd" } $SurfaceProp "flesh" $Contents "solid" $EyePosition 0 0 70 $MaxEyeDeflection 90 $CDMaterials "models\regiments\1st foot guards\private\" $Attachment "eyes" "ValveBiped.Bip01_Head1" 3.47 -3.99 -0.1 rotate 0 -80.1 -90 $Attachment "mouth" "ValveBiped.Bip01_Head1" 0.8 -5.8 -0.15 rotate 0 -80 -90 $Attachment "chest" "ValveBiped.Bip01_Spine2" 5 4 0 rotate 0 90 90 $Attachment "forward" "ValveBiped.forward" 0 0 0 rotate 0 0 0 $Attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" 0 0 0 rotate -90 -90 0 $Attachment "anim_attachment_LH" "ValveBiped.Anim_Attachment_LH" 0 0 0 rotate -90 -90 0 $Attachment "anim_attachment_head" "ValveBiped.Bip01_Head1" 0 0 0 rotate -90 -90 0 $CBox 0 0 0 0 0 0 $BBox -37.55 -9.934 -2.77 36.571 10.341 74.088 // $HBoxSet "default" // $HBox 1 "ValveBiped.Bip01_Head1" -1.25 -6.5 -3.19 8.25 3.5 3.31 "" // $HBox 4 "ValveBiped.Bip01_L_UpperArm" 0 -2.75 -2.75 12.51 1.75 2.25 "" // $HBox 4 "ValveBiped.Bip01_L_Forearm" 0 -2.19 -2.38 13 1.81 1.62 "" // $HBox 4 "ValveBiped.Bip01_L_Hand" 0.06 -2 -1.5 4.06 1 2.5 "" // $HBox 5 "ValveBiped.Bip01_R_UpperArm" 0 -3 -2.25 12.39 2 2.75 "" // $HBox 5 "ValveBiped.Bip01_R_Forearm" -0.5 -2.2 -1.55 12.5 1.8 2.45 "" // $HBox 5 "ValveBiped.Bip01_R_Hand" 0.06 -2 -2.5 4.06 1 1.5 "" // $HBox 6 "ValveBiped.Bip01_L_Thigh" 0 -3.75 -3.25 17.85 3.75 3.25 "" // $HBox 6 "ValveBiped.Bip01_L_Calf" 0 -3.51 -3.28 15.64 3.49 2.72 "" // $HBox 6 "ValveBiped.Bip01_L_Foot" -1.07 -2 -2.84 5.04 5 2.16 "" // $HBox 6 "ValveBiped.Bip01_L_Toe0" -0.5 -3 -2.19 2.5 0 2.46 "" // $HBox 7 "ValveBiped.Bip01_R_Thigh" 0 -3.75 -3.25 17.85 3.75 3.25 "" // $HBox 7 "ValveBiped.Bip01_R_Calf" 0 -3.51 -2.82 15.64 3.49 3.18 "" // $HBox 7 "ValveBiped.Bip01_R_Foot" -1.06 -2.01 -2.28 5.05 4.99 2.72 "" // $HBox 7 "ValveBiped.Bip01_R_Toe0" -0.5 -3 -2.6 2.5 0 2.1 "" // $HBox 3 "ValveBiped.Bip01_Pelvis" -7.5 -5.5 -6 7.5 8.5 5 "" // $HBox 2 "ValveBiped.Bip01_Spine2" -2.5 -2.5 -7 14.5 7.5 7 "" // $SkipBoneInBBox $Sequence "ragdoll" { "npc_anims\ragdoll.smd" activity "ACT_DIERAGDOLL" 1 fadein 0.2 fadeout 0.2 fps 30 } $IncludeModel "humans/male_shared.mdl" $IncludeModel "humans/male_ss.mdl" $IncludeModel "humans/male_gestures.mdl" $IncludeModel "humans/male_postures.mdl" $IKChain "rhand" "ValveBiped.Bip01_R_Hand" knee 0.707 0.707 0 $IKChain "lhand" "ValveBiped.Bip01_L_Hand" knee 0.707 0.707 0 $IKChain "rfoot" "ValveBiped.Bip01_R_Foot" knee 0.707 -0.707 0 $IKChain "lfoot" "ValveBiped.Bip01_L_Foot" knee 0.707 -0.707 0 $CollisionJoints "npc_physics.smd" { $mass 0 $inertia 2 $damping 0.01 $rotdamping 0.4 $rootbone "ValveBiped.Bip01_pelvis" $jointconstrain "ValveBiped.Bip01_L_Thigh" x limit -25 20 0.04 $jointconstrain "ValveBiped.Bip01_L_Thigh" y limit -73 6 0.04 $jointconstrain "ValveBiped.Bip01_L_Thigh" z limit -93 30 0.04 $jointmassbias "ValveBiped.Bip01_L_Calf" 2 $jointconstrain "ValveBiped.Bip01_L_Calf" x limit 0 0 0.04 $jointconstrain "ValveBiped.Bip01_L_Calf" y limit 0 0 0.04 $jointconstrain "ValveBiped.Bip01_L_Calf" z limit -8 126 0.04 $jointconstrain "ValveBiped.Bip01_R_Thigh" x limit -25 39 0.04 $jointconstrain "ValveBiped.Bip01_R_Thigh" y limit -8 75 0.04 $jointconstrain "ValveBiped.Bip01_R_Thigh" z limit -97 32 0.04 $jointmassbias "ValveBiped.Bip01_R_Calf" 2 $jointconstrain "ValveBiped.Bip01_R_Calf" x limit 0 0 0.04 $jointconstrain "ValveBiped.Bip01_R_Calf" y limit 0 0 0.04 $jointconstrain "ValveBiped.Bip01_R_Calf" z limit -12 126 0.04 $jointmassbias "ValveBiped.Bip01_R_Foot" 2 $jointconstrain "ValveBiped.Bip01_R_Foot" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Foot" y limit -21 6 0.04 $jointconstrain "ValveBiped.Bip01_R_Foot" z limit -15 35 0.04 $jointconstrain "ValveBiped.Bip01_Spine2" x limit -48 48 0.04 $jointconstrain "ValveBiped.Bip01_Spine2" y limit -25 25 0.04 $jointconstrain "ValveBiped.Bip01_Spine2" z limit -25 50 0.04 $jointconstrain "ValveBiped.Bip01_L_UpperArm" x limit -50 57 0.04 $jointconstrain "ValveBiped.Bip01_L_UpperArm" y limit -102 19 0.04 $jointconstrain "ValveBiped.Bip01_L_UpperArm" z limit -93 30 0.04 $jointmassbias "ValveBiped.Bip01_L_Forearm" 2 $jointconstrain "ValveBiped.Bip01_L_Forearm" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Forearm" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Forearm" z limit -120 4 0.04 $jointconstrain "ValveBiped.Bip01_R_UpperArm" x limit -50 57 0.04 $jointconstrain "ValveBiped.Bip01_R_UpperArm" y limit -19 102 0.04 $jointconstrain "ValveBiped.Bip01_R_UpperArm" z limit -93 30 0.04 $jointmassbias "ValveBiped.Bip01_R_Forearm" 2 $jointconstrain "ValveBiped.Bip01_R_Forearm" x limit 0 0 0.04 $jointconstrain "ValveBiped.Bip01_R_Forearm" y limit 0 0 0.04 $jointconstrain "ValveBiped.Bip01_R_Forearm" z limit -120 4 0.04 $jointmassbias "ValveBiped.Bip01_R_Hand" 4 $jointconstrain "ValveBiped.Bip01_R_Hand" x limit -60 60 0.04 $jointconstrain "ValveBiped.Bip01_R_Hand" y limit -30 30 0.04 $jointconstrain "ValveBiped.Bip01_R_Hand" z limit -57 70 0.04 $jointmassbias "ValveBiped.Bip01_Head1" 2 $jointconstrain "ValveBiped.Bip01_Head1" x limit -20 20 0.04 $jointconstrain "ValveBiped.Bip01_Head1" y limit -25 25 0.04 $jointconstrain "ValveBiped.Bip01_Head1" z limit -13 30 0.04 $jointmassbias "ValveBiped.Bip01_L_Hand" 4 $jointconstrain "ValveBiped.Bip01_L_Hand" x limit -60 60 0.04 $jointconstrain "ValveBiped.Bip01_L_Hand" y limit -30 30 0.04 $jointconstrain "ValveBiped.Bip01_L_Hand" z limit -57 70 0.04 $jointmassbias "ValveBiped.Bip01_L_Foot" 2 $jointconstrain "ValveBiped.Bip01_L_Foot" x limit -1 -1 0.04 $jointconstrain "ValveBiped.Bip01_L_Foot" y limit -19 19 0.04 $jointconstrain "ValveBiped.Bip01_L_Foot" z limit -15 35 0.04 } $CollisionText { animatedfriction { "animfrictionmin" "1.000000" "animfrictionmax" "1000.000000" "animfrictiontimein" "0.800000" "animfrictiontimeout" "0.000000" "animfrictiontimehold" "0.500000" } editparams { "rootname" "ValveBiped.Bip01_pelvis" "totalmass" "90.000000" "jointmerge" "ValveBiped.Bip01_Pelvis,ValveBiped.Bip01_Spine1" } } [/CODE] This is what the model looks like: [video]https://youtu.be/cO2nBXkwSzU[/video]
[QUOTE=cwca99;52354805] This is what the model looks like: [video]file:///C:/Users/Chris/Videos/saved films/problem_video.mp4[/video][/QUOTE] That's not how it works, son. You have to upload your video somewhere (like Youtube) so we can watch it. Anyway, another tip for you: There's a tag for codes which you should put your QC in so it looks better for us to read. (It's not a must, but people might ignore your thread if it looks a bit messy) Use code tag like this : [noparse][code]insert your qc code here[/code][/noparse] It will look like this after you edit/post : [code] insert your qc code here [/code]
[QUOTE=ferdam;52355500]That's not how it works, son. You have to upload your video somewhere (like Youtube) so we can watch it. Anyway, another tip for you: There's a tag for codes which you should put your QC in so it looks better for us to read. (It's not a must, but people might ignore your thread if it looks a bit messy) Use code tag like this : [noparse][code]insert your qc code here[/code][/noparse] It will look like this after you edit/post : [code] insert your qc code here [/code][/QUOTE] oh thanks for the tips. As you can tell I am very new to this!
[QUOTE=cwca99;52359776]oh thanks for the tips. As you can tell I am very new to this![/QUOTE] No problem, you are welcome To the problem: It seems like your ragdoll collisions model is rotated / misaligned. You could check what's going on if you load your model in Model Viewer and activate show physics/collisions. You can try [u]vcollide_wireframe 1[/u] in console, but I'm not sure if it show collisions for ragdolls.
[QUOTE=ferdam;52359871]No problem, you are welcome To the problem: It seems like your ragdoll collisions model is rotated / misaligned. You could check what's going on if you load your model in Model Viewer and activate show physics/collisions. You can try [u]vcollide_wireframe 1[/u] in console, but I'm not sure if it show collisions for ragdolls.[/QUOTE] Thanks! Do you know how I could fix this? Would moving it in blender work?
Sorry, you need to Log In to post a reply to this thread.