XCOM 2
Extract Corpses
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!
< >
Visualizzazione di 1-15 commenti su 20
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  [sviluppatore] 26 feb 2017, ore 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.
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...
Ultima modifica da krumiro; 27 feb 2017, ore 3:37
Messaggio originale di 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
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
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
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);
}
}
you could use the viper bind animation for carrying the viper
Messaggio originale di 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
Messaggio originale di 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 ?
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...
< >
Visualizzazione di 1-15 commenti su 20
Per pagina: 1530 50