• Moving viewmodel?
    10 replies, posted
I use a normal model for a view model. Yet I don't want to make a new one to make it fit at the right spot, So how would I properly place the viewmodel in bottomright of the screen? How can I move it using local coordinates?
That sets the size, I already have that. [titlequote] Moving viewmodel? [/titlequote]
[b][url=wiki.garrysmod.com/?title=SWEP.GetViewModelPosition]SWEP.GetViewModelPosition [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] Override that and move it to your liking.
I tried that, that litteraly moves the view model position to rotate with the player
Isn't that what you wanted?:confused:
I just want to move it down right some, not move the position it thinks the player is
make it think the player is "down right some"?
[QUOTE=Map in a box;24696969]I just want to move it down right some, not move the position it thinks the player is[/QUOTE] I fail to see the difference between moving something and moving somethings origin:colbert:
It looks weird if i turn.
You need to convert the coordinates to global. [lua] function SWEP:GetViewModelPosition( pos, ang ) pos,ang = LocalToWorld(SomeViewModelOffset,SomeViewModelAnlgeOffset,pos,ang) return pos, ang end [/lua]
Sorry, you need to Log In to post a reply to this thread.