XCOM 2
Extract Corpses
krumiro Feb 19, 2017 @ 8:19am
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!
< >
Showing 1-15 of 20 comments
krumiro Feb 23, 2017 @ 3:13am 
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  [developer] Feb 26, 2017 @ 5:46pm 
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 Feb 27, 2017 @ 3:36am 
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...
Last edited by krumiro; Feb 27, 2017 @ 3:37am
Originally posted by 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 Jun 17, 2017 @ 7:05am 
Hello Vortex. Any new advance on the subject? ;)
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 Jun 23, 2017 @ 6:33am 
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)...
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 Jun 27, 2017 @ 8:42am 
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 Jun 28, 2017 @ 7:53am 
you could use the viper bind animation for carrying the viper
Originally posted by 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
Originally posted by 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 Jun 29, 2017 @ 6:01am 
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...
Interesting
< >
Showing 1-15 of 20 comments
Per page: 1530 50