I have this vehicle that uses a bone rotation code, that makes the player look like they're sitting on a motorbike. Anyways, about 70% of the time my bots will have their bones reset to normal, (after getting off the bike ) and other times they are all twisted up. What can I do to make sure they are normal 100% of the time?
here is my bone rotation code:
And so on like that for more bones. And my reset goes like this:

here is my bone rotation code:
Code:
// added for driver position resetting simulated function AttachDriver(Pawn P) { super.AttachDriver(P); // Pelvis -------------------------------------------------- PelvisDrive.Yaw=8192; P.SetBoneRotation('Bip01 Pelvis',PelvisDrive); // Head ---------------------------------------------------- NeckDrive.Yaw=-10000; P.SetBoneRotation('Bip01 Head',NeckDrive); // Spine --------------------------------------------------- SpineDrive.Yaw=2048; P.SetBoneRotation('Bip01 Spine',SpineDrive); //Spine 1 SpineDrive1.Yaw=2048; P.SetBoneRotation('Bip01 Spine1',SpineDrive1); //Spine 2 SpineDrive2.Yaw=2048; P.SetBoneRotation('Bip01 Spine2',SpineDrive2);
Code:
simulated function DetachDriver(Pawn P) { // After the player leaves the vehicle, resets its additional bone rotations or else he'll be all twisted // Simply resets everything // Pelvis -------------------------------------------------- Driver.SetBoneRotation('Bip01 Pelvis'); // Head ---------------------------------------------------- Driver.SetBoneRotation('Bip01 Head');
Comment