Announcement

Collapse
No announcement yet.

Changing SkeletalMesh Componenmts in runtime giving issues.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changing SkeletalMesh Componenmts in runtime giving issues.

    Hello,

    I am having a strange problem. I have created a skeletal mesh having several clothing components who share the same animation blueprint , contained within the character blueprint. So at the beginning of the game , I can decide which set of clothes the actor should wear and set the respective asset accordingly, as shown below, which works perfect.

    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	88.0 KB
ID:	1144327

    Below is the result of clothing combination , which is perfectly in sync with the animationset , and showing no error.

    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	68.6 KB
ID:	1144328

    However, I want to change clothes in runtime. So I walk up to the wardrobe, select a cloth, and hit equip, as shown below :

    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	46.1 KB
ID:	1144329

    So in the wardrobe inventory widget I am calling the character class clothing variable and changing its skeletalmesh value, as shown below:

    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	68.1 KB
ID:	1144330

    But this is giving very bad result. The cloth and the mesh is not in sync, as seen below:

    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	39.7 KB
ID:	1144331


    I don't understand. The same code is getting executed both the time. Also I have tested with all the clothing meshes at the beginning of play, and they are perfectly in sync at that time. Kindly help.
    Last edited by sameek4; 02-15-2015, 06:14 PM.
    DayNight Cycle - https://www.unrealengine.com/marketplace/daynight-cycle
    Jigsaw Puzzle Template - https://www.unrealengine.com/marketp...uzzle-template
    Post Process Blendables Volume 1 - https://www.unrealengine.com/marketp...ndables-volume
    MSSQL Integration for UE4 - https://www.unrealengine.com/marketp...ql-integration
    Radar System with Minimap - https://www.unrealengine.com/marketp...m-with-minimap

    #2
    Are all your mesh/cloth components "anim parented" to the same single Mesh?
    On working with modular characters to avoid parts losing sync the ideal is that just one from your components controls the animation.

    Give a look by "Modular Character" on docs and you'll probably get both C++ and Blueprint ways to do this.

    Hope this helps.

    here is the node to assign the "MASTER" animated component that will drive all others:
    https://docs.unrealengine.com/latest...ent/index.html
    Last edited by creasso; 02-15-2015, 07:38 PM.
    VIDA - U4 Indie Goth Horror Game
    Project Thread

    Comment


      #3
      Originally posted by creasso View Post
      Are all your mesh/cloth components "anim parented" to the same single Mesh?
      On working with modular characters to avoid parts losing sync the ideal is that just one from your components controls the animation.

      Give a look by "Modular Character" on docs and you'll probably get both C++ and Blueprint ways to do this.

      Hope this helps.

      here is the node to assign the "MASTER" animated component that will drive all others:
      https://docs.unrealengine.com/latest...ent/index.html
      You are a life saver , genius. It is working flawlessly now.
      Just one concern though, in the begin play also I am not setting master component explicitly. But that time it is working fine. Why do I need to do this in the middle of the play and not in the beginning of the play?
      DayNight Cycle - https://www.unrealengine.com/marketplace/daynight-cycle
      Jigsaw Puzzle Template - https://www.unrealengine.com/marketp...uzzle-template
      Post Process Blendables Volume 1 - https://www.unrealengine.com/marketp...ndables-volume
      MSSQL Integration for UE4 - https://www.unrealengine.com/marketp...ql-integration
      Radar System with Minimap - https://www.unrealengine.com/marketp...m-with-minimap

      Comment

      Working...
      X