Clientside Model Scaling

How would someone go about putting models attached to a weapons viewmodel and scaling it down? Similar to the following picture below:

http://dl.dropbox.com/u/1394819/infinidungeon_cool.jpg

thats iron sight i belive :slight_smile:

http://wiki.garrysmod.com/?title=G.ClientsideModel along with some proper use of http://wiki.garrysmod.com/?title=Entity.LookupAttachment I assume. Add http://wiki.garrysmod.com/?title=Entity.SetModelScale for the scaling.

Thanks. I wasn’t even aware they had a SetModelScale function.

What the hell are you smoking?

Ok… I tried to start what you suggested, but I cant even get the model to physically draw.

[lua]
if (CLIENT) then
local ViewModel = LocalPlayer():GetViewModel()
if not ViewModel:IsValid() then return end

self.EjectionPort = ViewModel:GetAttachment(“1”)
//if not self.EjectionPort then return end

self.Angle = self.EjectionPort.Ang
self.Forward = self.Angle:Forward()
self.Position = self.EjectionPort.Pos
local UnderAttachModel = ents.Create(“prop_physics”)
UnderAttachModel:SetPos(self.EjectionPort.Pos)
UnderAttachModel:SetModel(AttachMode)
UnderAttachModel:SetParent(ViewModel)
UnderAttachModel:Spawn()
end
[/lua]

Try with a ClientsideModel() rather than ents.Create? I’m not sure whether or not prop_physics is one of the entities you can spawn clientside with ents.Create.

I tried it. I wasnt sure whether or not you needed to add the Spawn() and even with it, it did not work. so I just tried using the normal ents.create. It stated on the wiki that all that function is is just a fancy “CLIENT” wrapper. So it should work the way I did it, mainly because they are both the same thing.