• "SetBoneMatrix: Bone is unwriteable" spammed in console, but everything else works perfectly?
    3 replies, posted
So i want to redraw the viewmodel(in a different material) in ViewModelDrawn hook, everything works perfectly expect this being spammed in the console: [code]SetBoneMatrix: Bone is unwriteable[/code] Here's what i used: [code] render.MaterialOverride( Material( "Models/Props_Combine/PortalBall001_Sheet" ) ) // exampley material local vm = self.Owner:GetViewModel() vm2 = ClientsideModel( vm:GetModel() ) vm2:SetNoDraw( true ) vm2:AddCallback( "BuildBonePositions",function( ent,num ) for i = 0,vm:GetBoneCount() do // copy-paste bone matrixes lol local mat = vm:GetBoneMatrix( i ) vm2:SetBoneMatrix( i,mat ) end end ) vm2:DrawModel() vm2:Remove() render.MaterialOverride() // clear MaterialOverride so no conflicts is guaranteed. [/code] is there any way to fix it?
You could've just set the material on the view model and call DrawModel() on the view model ( dont forget to reset the material after )
[QUOTE=Robotboy655;48455008]You could've just set the material on the view model and call DrawModel() on the view model ( dont forget to reset the material after )[/QUOTE] Crashes the game when DrawModel() is called on the view model on my end( but calling DrawModel() on the world model works )
[QUOTE=RodgerSwaggin;48455135]Crashes the game when DrawModel() is called on the view model on my end( but calling DrawModel() on the world model works )[/QUOTE] Don't call it from View Model drawing hook, or add safeguards.
Sorry, you need to Log In to post a reply to this thread.