public bool hasMomentum()
        {
            if (!VHVRConfig.WeaponNeedsSpeed())
            {
                return(true);
            }

            foreach (Vector3 snapshot in snapshots)
            {
                if (Vector3.Distance(snapshot, transform.localPosition) > MIN_DISTANCE)
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #2
0
        public bool hasMomentum()
        {
            if (!VHVRConfig.WeaponNeedsSpeed())
            {
                return(true);
            }

            foreach (Vector3 snapshot in snapshots)
            {
                if (Vector3.Distance(snapshot, transform.localPosition) > MIN_DISTANCE + colliderDistance / 2)
                {
                    return(true);
                }
            }
            foreach (Vector3 snapshot in snapshotsC)
            {
                if (Vector3.Distance(snapshot, GetHandPosition()) > MIN_DISTANCE_STAB && isStab())
                {
                    return(true);
                }
            }

            return(false);
        }