Gravity Gun, Controling the ending tips

The gravity gun has those 3 tips that extend and retract whenever say you are looking at a close prop, you know what I mean… Question is how do I make it change the position of the metal tips? It’s definetly not an animation (SendWeaponAnim).

It’s a poseparameter, “active” I think.

You can’t set the “active” (this issue only happens with view,not with worldmodels) poseparameter if you already have the gravity gun in your inventory.
Example,grab an entity and switch to the physgun,as you can see,the gravity gun will override the physgun’s viewmodel pose parameter.
I fixed it by renaming the viewmodel’s pose parameter (i also added the super physcannon skin).
Fixed viewmodel with “prong_open” pose parameter and normal/super gravity gun skin.
Only use my “fix” if you want the player to keep the gravity gun,if the gravity gun will not stay in his inventory,then just do Viewmodel:SetPoseParameter(“active”,value)

Ok I used SetPoseParameter on the weapon, but it only changes the world model and not the view model

You need to set it on the weapon and to the viewmodel.

self.Owner:GetViewModel():SetPoseParameter( “active”, 1 )

How come this won’t work?

It will not work if the gravity gun is in your inventory.
Post your code,or at least the part where you set the pose parameter.

function SWEP:Think()

self.Owner:GetViewModel():SetPoseParameter( "active", 1 )
self.Weapon:SetPoseParameter( "active", 1 )


Is this shared?


The only thing I’ve seen using this is the punt cannon on toybox (which uses a custom model), and it seems to me that Jvs made this so I’m gonna leave this to him.

Always check if the gravity gun is in your inventory while trying your weapon,i can’t stress it enough.
Also,add some IsValid checks before using the setposeparameter on the viewmodel,self.Weapon is always valid tought,the viewmodel might not.