• DModelPanel Walk
    2 replies, posted
How can I make a DModelPanel walk but in the same time to don't rotate. [lua] model = vgui.Create("DModelPanel") model:SetSize(500,500) model:SetPos(22,55) model:SetModel(LocalPlayer():GetModel()) local iSeq = model.Entity:LookupSequence( "menu_walk" ) model.Entity:ResetSequence( iSeq ) function model:LayoutEntity(Entity) return end model:SetAnimated(true) model:SetFOV(fovpos) model.Think = function() model:SetCamPos(campos) model:SetLookAt(lookpos) end [/lua] If I remove "function model:LayoutEntity(Entity) return end" the model will rotate and walk but once I use that the model stop walking and rotating. Basically I want the model to walk and don't rotate.
use this: [CODE]function model:LayoutEntity( Entity ) if ( self.bAnimated ) then self:RunAnimation() end end[/CODE]
Thank you that worked.
Sorry, you need to Log In to post a reply to this thread.