How would I have a DModelPanel mimic the player's current animation?
4 replies, posted
This has been confusing me for a while now.
I've tried running sequences, but the player model will only play the idle animation.
I've also been unable to find a way to get the player's current animation.
I've also tried setting the positions of its bones, but its bones are unwriteable.
Something like;
local pnl = vgui.Create( "DPanel" )
local modelPnl = vgui.Create( "DModelPanel", pnl )
icon.Entity:SetSequence("sequence")
Yes, I know how to make one, and I know how to set the sequence.
But this doesn't help because it doesn't show the same animation as the player.
Oh my bad, misread...
I think you can do...
modelPnl:SetEntity(LocalPlayer())
Can't test though.
Okay, turns out I was stupid and the answer was as easy as this:
panel:SetSequence(LocalPlayer():GetSequence());
Looking at the docs, I had thought GetSequence only returned info on a specified sequence.
Sorry, you need to Log In to post a reply to this thread.