private void FixedUpdate() { if (!isCatching) { float step = 0.15f * Time.deltaTime; transform.position = Vector3.MoveTowards(transform.position, PointerRaycast.GetInstance().CurrentTarget.Value, step); } }
public float runThreshold; //min target distance to animate run // Update is called once per frame void Update() { if (GameManager.instance.anchor != null) { transform.parent = GameManager.instance.anchor.transform; } if (!PointerRaycast.GetInstance().CurrentTarget.Equals(null)) { this._WalkTo(PointerRaycast.GetInstance().CurrentTarget.Value); } }
void FixedUpdate() { var target = PointerRaycast.GetInstance().CurrentTarget; if (target == null) { return; } if (!m_pointer) { m_pointer = Instantiate(movePointerPrefab, target.Value, Quaternion.identity); } m_pointer.transform.position = target.Value; }
// Update is called once per frame void FixedUpdate() { if (m_isAnchored) { return; } var center = PointerRaycast.GetInstance().CurrentTarget; if (center != null) { if (m_Arena != null) { m_Arena.transform.position = center.Value; } else { m_Arena = Instantiate(arenaPrefab, center.Value, Quaternion.identity); } } }
public PointerRaycast() { PointerRaycast.m_instance = this; }