I have a simple custom entity that I want the player to be able to pickup when pressing use. However, it looks like the model I am using has too much mass. This is what I’ve tried so far:
[lua]if SERVER then AddCSLuaFile(“shared.lua”) end
ENT.Type = “anim”
ENT.Base = “base_anim”
if SERVER then
local phys = self:GetPhysicsObject() if IsValid(phys) then phys:AddGameFlag(4) -- PLAYER_HELD phys:ClearGameFlag(32) -- HEAVY_OBJECT phys:ClearGameFlag(128) -- NO_PLAYER_PICKUP phys:SetMass(5) phys:Wake() end end -- ...
I tried setting / clearing some flags that looked relevant, but it still isn’t working.