Retargetting characterIK

leeheo72

New member
Hello, I've been working on character change using the third-person controller on PUN2. I managed to get another character to animate after changing, but it could not use any weapons(The weapon is unable to fire because of the look sensitivity on the shootableweaponproperties). The changed character is unable to unequip or equip any items. Any attempts will result in breaking the entire weapon system. (Stays broken even after changing back). I believe this is due to characterIK, is there a way to retarget it?
 

Attachments

  • capture.png
    capture.png
    294.6 KB · Views: 6
Do you have "Wait for animation event" checked on?
1652709088264.png

It looks like your character waits for an event that isnt sending.

Could also be IK, have you set ik target somewere? Have you made a state that sets the IK weight back to 0 when its not needed?
 
I've tried unclicking/clicking "wait for the animation event," and it did not work. Also, I've set the IK weight back to 0 when not needed. (For fixing droopy looking) but this did not fix the weapons system from being broken.
I'm trying to achieve here to change between two characters during run time. I've found out how to do it in single-player mode. I am still figuring out a multiplayer mode(PUN2)
I've read a couple of articles about spawning two player prefabs by modifying "getcharacterprefab", but I couldn't figure out how.
 
Last edited:
I actually don't understand, what you try to achieve. What do you mean by "character change"? The image above looks like the animator is in an undefined state.
 
So the concept of my game is to change between two characters. I.e. transforming from human to monster.
The problem is both characters have their own bone structure. As shown in the picture, playerPUN6 contains all controller scripts attached to them.
I have created a script to change between space_soldier_ragdoll and monster rig. The model will change, and animations will work until I start using the weapons.
 

Attachments

  • player.png
    player.png
    12.3 KB · Views: 3
  • player2.png
    player2.png
    106.9 KB · Views: 3
The communication between item system / weapons and the animator works through animator parameters and animation events. You can log the animation parameters through the animator monitor component. This way you can check whether before and after switching the rig the parameters are still set correctly. The animation events are trickier as there is no central monitoring. They might be used for equip/unequip/use/reload. If you can't use the weapon, it might be that it is still waiting for the equip event to happen.
Do you use different animations for the two rigs?
 
Top