XCOM 2
Extract Corpses
krumiro 19. feb. 2017 kl. 8:19
fixing Viper Carrying animation
Is there a Way to not let Vipers look like missiles when carrying them? Can you "relax" their tail?

Great mod by the way!
< >
Viser 1-15 af 20 kommentarer
krumiro 23. feb. 2017 kl. 3:13 
Guys, I'm trying to fix this by myself but I need your help... I'm looking for an alternative "beingcarried" animation to apply to the viper (instead of XCom_2/Packages/Characters/Soldiers_ANIM.AS_CARRY/BODY)... any ideas? maybe some modder out there can give me a hint on where to change the physics of the viper's tail so that it "relaxes to gravity" while being carried?
Maluco Marinero  [udvikler] 26. feb. 2017 kl. 17:46 
If you figure out how I'd happily accept the fix, most people get a chuckle out of the bug enough that I haven't spent the time to figure this out, the viper may require some alternate animset or something, but I'm no animation rigger so I'm not really sure how it all works under the hood.
krumiro 27. feb. 2017 kl. 3:36 
maybe the Modders of the two "Edited Ragdoll Physics", who seem experts on the subject, know how to easily "relax to gravity" the viper's tail... I have a feeling it is something as easy as a couple of codelines...
Sidst redigeret af krumiro; 27. feb. 2017 kl. 3:37
Oprindeligt skrevet af krumiro:
maybe the Modders of the two "Edited Ragdoll Physics", who seem experts on the subject, know how to easily "relax to gravity" the viper's tail... I have a feeling it is something as easy as a couple of codelines...
hmm you got my interest... In fact I'd like to implement this into all carried units...I don't know how to make it happen ....yet.. but I will try to look into it
I have a theory on how to do this but I am not sure persay
krumiro 17. juni 2017 kl. 7:05 
Hello Vortex. Any new advance on the subject? ;)
Vortex ♀ Pixalation 17. juni 2017 kl. 11:59 
I couldn't figure it out, I have tried but I am unsure how to make certain bones ragdolled while others animate it can be done if Firaxis set it up that way, Example the Faceless' jiggly things
krumiro 23. juni 2017 kl. 6:33 
I see. What about, instaead of leaving the tail ragdolled, animating it like the rest of the carried body but in a way that seems realistic in the circumstance of the Viper being carried? For example, the tail hanging down frontally (like a carried soldier's legs) and then, since it is long, making a U turn and going up again until i reaches the carrying soldier's other shoulder and with the tail tip hanging behind the carrying soldier's back... (it's the only configuration I can think of for such a long extremity)...
Vortex ♀ Pixalation 23. juni 2017 kl. 16:24 
hmmm I'd have to really invest some time in animations, it isn't easy, I don't know if I am going to get the time to do it, physics would be easier for me to do
krumiro 27. juni 2017 kl. 8:42 
Yes, It's not easy... meanwhile I've been working on a similar objective for another mod and I wanted to share notes with you about this section of the XGUnit class that can help also in this subject! it deals with giving new orders to just a skeletal component of the soldier that was previously rigid/semi-rigid (the weapon) during a specific event (owner's death) and "waking it up" giving it new physics/impulse/ragdoll action (dropping it on the floor)...:



simulated function DropWeapon()
{
local XGWeapon kWeapon;
local Vector vLoc;
local Rotator rRot;
local XComWeapon kXComWeapon;

// Lose the weapon we're holding here. Drop it or launch it.
kWeapon = GetInventory().GetActiveWeapon();

if (kWeapon != none && GetPawn().m_bDropWeaponOnDeath )
{
kXComWeapon = XComWeapon(kWeapon.m_kEntity);
m_kPawn.Mesh.GetSocketWorldLocationAndRotation(kXComWeapon.DefaultSocket, vLoc, rRot);
m_kPawn.Mesh.DetachComponent(kXComWeapon.Mesh);
kXComWeapon.SetBase(None);
kWeapon.m_kEntity.AttachComponent(kXComWeapon.Mesh);
SkeletalMeshComponent(kXComWeapon.Mesh).SetPhysicsAsset(SkeletalMeshComponent(kXComWeapon.Mesh).PhysicsAsset, true);
//GetInventory().DropItem( kWeapon );
//GetInventory().UnequipItem();
kWeapon.m_kEntity.CollisionComponent = kXComWeapon.Mesh;
SkeletalMeshComponent(kXComWeapon.Mesh).PhysicsWeight=1.0f;
SkeletalMeshComponent(kXComWeapon.Mesh).ForceSkelUpdate();
SkeletalMeshComponent(kXComWeapon.Mesh).UpdateRBBonesFromSpaceBases(TRUE, TRUE);
SkeletalMeshComponent(kXComWeapon.Mesh).bSyncActorLocationToRootRigidBody=true;

kXComWeapon.Mesh.WakeRigidBody();
kWeapon.m_kEntity.SetPhysics(PHYS_RigidBody /*PHYS_None*/);
kWeapon.m_kEntity.SetHidden(false);
kWeapon.m_kEntity.SetLocation(vLoc);
kWeapon.m_kEntity.SetRotation(rRot);

SkeletalMeshComponent(kXComWeapon.Mesh).SetRBPosition(vLoc);
SkeletalMeshComponent(kXComWeapon.Mesh).SetRBRotation(rRot);
SkeletalMeshComponent(kXComWeapon.Mesh).SetRBLinearVelocity(vect(0,0,0), false);
SkeletalMeshComponent(kXComWeapon.Mesh).SetRBAngularVelocity(vect(0,0,0), false);
}
}
Phantom 28. juni 2017 kl. 7:53 
you could use the viper bind animation for carrying the viper
Oprindeligt skrevet af Phantom:
you could use the viper bind animation for carrying the viper
that would never work at all, sorry but I am being honest the Viper would be moving and look alive
Oprindeligt skrevet af krumiro:
Yes, It's not easy... meanwhile I've been working on a similar objective for another mod and I wanted to share notes with you about this section of the XGUnit class that can help also in this subject! it deals with giving new orders to just a skeletal component of the soldier that was previously rigid/semi-rigid (the weapon) during a specific event (owner's death) and "waking it up" giving it new physics/impulse/ragdoll action (dropping it on the floor)...:



simulated function DropWeapon()
{
local XGWeapon kWeapon;
local Vector vLoc;
local Rotator rRot;
local XComWeapon kXComWeapon;

// Lose the weapon we're holding here. Drop it or launch it.
kWeapon = GetInventory().GetActiveWeapon();

if (kWeapon != none && GetPawn().m_bDropWeaponOnDeath )
{
kXComWeapon = XComWeapon(kWeapon.m_kEntity);
m_kPawn.Mesh.GetSocketWorldLocationAndRotation(kXComWeapon.DefaultSocket, vLoc, rRot);
m_kPawn.Mesh.DetachComponent(kXComWeapon.Mesh);
kXComWeapon.SetBase(None);
kWeapon.m_kEntity.AttachComponent(kXComWeapon.Mesh);
SkeletalMeshComponent(kXComWeapon.Mesh).SetPhysicsAsset(SkeletalMeshComponent(kXComWeapon.Mesh).PhysicsAsset, true);
//GetInventory().DropItem( kWeapon );
//GetInventory().UnequipItem();
kWeapon.m_kEntity.CollisionComponent = kXComWeapon.Mesh;
SkeletalMeshComponent(kXComWeapon.Mesh).PhysicsWeight=1.0f;
SkeletalMeshComponent(kXComWeapon.Mesh).ForceSkelUpdate();
SkeletalMeshComponent(kXComWeapon.Mesh).UpdateRBBonesFromSpaceBases(TRUE, TRUE);
SkeletalMeshComponent(kXComWeapon.Mesh).bSyncActorLocationToRootRigidBody=true;

kXComWeapon.Mesh.WakeRigidBody();
kWeapon.m_kEntity.SetPhysics(PHYS_RigidBody /*PHYS_None*/);
kWeapon.m_kEntity.SetHidden(false);
kWeapon.m_kEntity.SetLocation(vLoc);
kWeapon.m_kEntity.SetRotation(rRot);

SkeletalMeshComponent(kXComWeapon.Mesh).SetRBPosition(vLoc);
SkeletalMeshComponent(kXComWeapon.Mesh).SetRBRotation(rRot);
SkeletalMeshComponent(kXComWeapon.Mesh).SetRBLinearVelocity(vect(0,0,0), false);
SkeletalMeshComponent(kXComWeapon.Mesh).SetRBAngularVelocity(vect(0,0,0), false);
}
}
What does this code do precisely ?
krumiro 29. juni 2017 kl. 6:01 
It uses the command Mesh.WakeRigidBody() to just "a part" of the soldier skeletal structure (his weapon) so that it doesn't follow the entire structure during death animation but "wakes up" and does something different (falls following gravity)... I thought it is a similar situation to the objective we are trying to achieve with the tail of the vipers...
Vortex ♀ Pixalation 29. juni 2017 kl. 13:16 
Interesting
< >
Viser 1-15 af 20 kommentarer
Per side: 1530 50