Exemplo n.º 1
0
 //IK ANIMATION TARGETING REQUIRES EXTRACTION OF IK MOVEMENT
 #region Constructor
 public PickUp(GameObject OwnerObject, IKRef IKRef, InfoBuffer InfoBuffer, LayerMask GrabbableLayer, float grabRange, float playerHeight, float animTime)
 {
     this.ownerObject    = OwnerObject;
     this.ownerTransform = OwnerObject.transform;
     this.iKRef          = IKRef;
     this.infoBuffer     = InfoBuffer;
     this.grabRange      = grabRange;
     this.playerHeight   = playerHeight;
     this.animTime       = animTime;
     this.isHolding      = InfoBuffer.isHolding;
     this.isHeldOverhead = InfoBuffer.isHeldOverhead;
     this.grabObject     = infoBuffer.grabObject;
     //It would be more swift to put player settings into their own monobehavior so that we could call a transform, and IK ref, an InfoBuffer, and a PlayerSettings, rather than 6 things calling 3 would be better.
 }
Exemplo n.º 2
0
    // THIS SCRIPT NEEDS TO BE ABLE TO BE FED INFORMATION ON THE ENTIRE SKELETON, WHICH MEANS THAT EVERY SCRIPT THAT CALLS FOR ANIMATION NEEDS ACCESS TO THE ENTIRE SKELETON. WHAT THE F**K.


    public AnimationIK(GameObject thisObject, IKRef ikRef, Vector3 LEVector, Vector3 REVector, Vector3 leftElbowVector, Vector3 rightElbowVector, float AnimTime)
    {
        Debug.Log("this shit is running");
        this.LE = ikRef.LE;
        this.RE = ikRef.RE;

        this.leftElbowEffector  = ikRef.LeftElbowEffector;
        this.rightElbowEffector = ikRef.RightElbowEffector;

        this.LEVector         = LEVector;
        this.REVector         = REVector;
        this.leftElbowVector  = leftElbowVector;
        this.rightElbowVector = rightElbowVector;

        this.animTime = AnimTime;

        this.thisObject = thisObject;
    }