• Derma Model Viewer Question
    4 replies, posted
[code] local window = vgui.Create( "DFrame" ) window:SetSize( 200,200 ) window:Center() window:SetTitle( "DModelPanel Test" ) window:MakePopup() local icon = vgui.Create( "DModelPanel", window ) icon:SetModel( LocalPlayer():GetModel() ) icon:SetSize( 100, 100 ) icon:SetCamPos( Vector( 50, 50, 120 ) ) icon:SetLookAt( Vector( 0, 0, 0 ) ) [/code] I got this code, I want the head to look at the mouse pos. Anyone got any help? Greatly apperacited. <3
[video=youtube;sy_phip5hHI]http://www.youtube.com/watch?v=sy_phip5hHI&feature=related[/video] I assume you're trying to copy that?
Yep.
You could have the SetLookAt follow the mouse using: [lua] gui.ScreenToVector( gui.MousePos() ); [/lua] [tab]Edit:[/tab] You can also use Entity.SetPoseParameter to do so.
[QUOTE=Chessnut;33781230]You could have the SetLookAt follow the mouse using: [lua] gui.ScreenToVector( gui.MousePos() ); [/lua] [tab]Edit:[/tab] You can also use Entity.SetPoseParameter to do so.[/QUOTE] That won't work.
Sorry, you need to Log In to post a reply to this thread.