void Update() { if (this.ragdoll == null) this.ragdoll = this.shadowControllers["ShadowRagdollController"] as ShadowRagdollController; if (this.locomotion == null) this.locomotion = this.shadowControllers["ShadowLocomotionController"]; this.dWeight.Tick(Time.deltaTime); // Set all of the shadows' root transform positions and orientations // to the real root position and orientation UpdateCoordinates(); this.locomotion.ControlledUpdate(); this.locomotion.Encode(this.locomotionPose); // Special management of the ragdoll controller for telling it // that it's fully faded out and done falling if (this.dWeight.IsMin == true) this.ragdoll.IsFalling = false; // Reuse the locomotion pose buffer this.locomotionPose = this.BlendRagdoll(this.locomotionPose); Shadow.ReadShadowData( this.locomotionPose, transform.GetChild(0), this); }
void Awake() { this.sWeight = new Slider(2.0f); this.aWeight = new Slider(2.0f); this.hWeight = new Slider(2.0f); this.rWeight = new Slider(2.0f); this.dWeight = new Slider(2.0f); this.sitting = this.GetComponent <ShadowSittingController>(); this.locomotion = this.GetComponent <ShadowLocomotionController>(); this.anim = this.GetComponent <ShadowAnimationController>(); this.headLook = this.GetComponent <ShadowHeadLookController>(); this.reach = this.GetComponent <ShadowReachController>(); this.ragdoll = this.GetComponent <ShadowRagdollController>(); }
void Awake() { this.sWeight = new Slider(2.0f); this.aWeight = new Slider(2.0f); this.hWeight = new Slider(2.0f); this.rWeight = new Slider(2.0f); this.dWeight = new Slider(2.0f); this.sitting = this.GetComponent<ShadowSittingController>(); this.locomotion = this.GetComponent<ShadowLocomotionController>(); this.anim = this.GetComponent<ShadowAnimationController>(); this.headLook = this.GetComponent<ShadowHeadLookController>(); this.reach = this.GetComponent<ShadowReachController>(); this.ragdoll = this.GetComponent<ShadowRagdollController>(); }
void Update() { if (this.ragdoll == null) { this.ragdoll = this.shadowControllers["ShadowRagdollController"] as ShadowRagdollController; } if (this.locomotion == null) { this.locomotion = this.shadowControllers["ShadowLocomotionController"]; } this.dWeight.Tick(Time.deltaTime); // Set all of the shadows' root transform positions and orientations // to the real root position and orientation UpdateCoordinates(); this.locomotion.ControlledUpdate(); this.locomotion.Encode(this.locomotionPose); // Special management of the ragdoll controller for telling it // that it's fully faded out and done falling if (this.dWeight.IsMin == true) { this.ragdoll.IsFalling = false; } // Reuse the locomotion pose buffer this.locomotionPose = this.BlendRagdoll(this.locomotionPose); Shadow.ReadShadowData( this.locomotionPose, hips, this); }