how do you reposition the world models?

ive been having trouble with hexing some stuff when i finely get everything right the world model is a cock gun

is there anykind of addon that can help me with this? or code?

Anyone?

Define SWEP:DrawWorldModel, and position it yourself.



SWEP.Offset = {
	Pos = {
		Up = 0,
		Right = 0,
		Forward = 0,
	},
	Ang = {
		Up = 0,
		Right = 0,
		Forward = 0,
	}
}

function SWEP:DrawWorldModel( )
	local hand, offset, rotate
	
	if not ValidEntity( self.Owner ) then
		self:DrawModel( )
		return
	end
	
	if not self.Hand then
		self.Hand = self.Owner:LookupAttachment( "anim_attachment_rh" )
	end
	
	hand = self.Owner:GetAttachment( self.Hand )
	
	if not hand then
		self:DrawModel( )
		return
	end

	offset = hand.Ang:Right( ) * self.Offset.Pos.Right + hand.Ang:Forward( ) * self.Offset.Pos.Forward + hand.Ang:Up( ) * self.Offset.Pos.Up
	
	hand.Ang:RotateAroundAxis( hand.Ang:Right( ), self.Offset.Ang.Right )
	hand.Ang:RotateAroundAxis( hand.Ang:Forward( ), self.Offset.Ang.Forward )
	hand.Ang:RotateAroundAxis( hand.Ang:Up( ), self.Offset.Ang.Up )
	
	self:SetRenderOrigin( hand.Pos + offset )
	self:SetRenderAngles( hand.Ang )
	
	self:DrawModel( )
end


Figure the angle first and then figure out the position.

i wish there was a addon that whould help me with doing this in game

Swep Construction Kit Switch to third person add a WELement put it your weapon model and get the ang and position from there


SWEP.WElements ={ type = "Model", model = "models/weapons/hexxed/w_pistol_m9.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(4.223, 1.468, -1.713), angle = Angle(180, -176.189, 3.457), size = Vector(0.888, 0.888, 0.888), color =

how do i take the Angle and position stuff from there its confusing

Angle(180, -176.189, 3.457) thats the angle this is the position pos = Vector(4.223, 1.468, -1.713)

Fucking shit i broke the winner button it wont let me give you 1000000 Winner ratings

garry fix the winner button please

(Thank you)

[editline]5th August 2011[/editline]

Can you give me an example as were to put it?

i dont get it