Jump to content

SetSkeleton()


Alienhead
 Share

Recommended Posts

Why do I get this when using the command self.mesh:SetSkeleton(self.mesh2) ??

Do the two models have to be identical even this the bone rig is identical ?

image.thumb.png.489e5d9099b6fc9e0609011ef32aa42c.png

image.thumb.png.489e5d9099b6fc9e0609011ef32aa42c.png.f8f9d6446e0e17a21fb9f8dbffc82741.png

This is my code that bottoms out.

 

    self.world = self.entity:GetWorld()
    self.mesh = LoadModel(self.world, self.playerModelFilenname)
    self.mesh2 = self.mesh:Instantiate(self.world)
    self.mesh2:SetScale(1.35,1.35, 1.35)
    self.mesh2:SetSkeleton(self.mesh)

 

I'm only happy when I'm coding, I'm only coding when I'm happy.

Link to comment
Share on other sites

Try this:

self.mesh2 = Model(self.mesh2)
self.mesh2:SetSkeleton(self.mesh.skeleton)

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...