Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function smooth_move(phys, pos, ang)
- local mass = phys:GetMass()
- local force = mass ^ 0.5
- local dir = (pos - phys:GetPos()) * force
- phys:SetVelocity(dir)
- -- this is bad
- phys:AddAngleVelocity((phys:GetAngleVelocity() *-1) + (ang:Forward() * force * 50))
- -- this is bad
- end
- local barrel = barrel
- local blacktea = tea
- hook.Add("Think",1,function()
- smooth_move(barrel:GetPhysicsObject(), blacktea:EyePos() + Vector(0, 0, 100), me:EyeAngles())
- end)
- barrel:SetAngles(Angle(0,0,0))
Advertisement
Add Comment
Please, Sign In to add comment