Esempio n. 1
0
    // if th mouse's planar position is not null and there is a nudge assistant, sends the point to the NudgeAssist
    void TryNudgeCharacter()
    {
        NudgeAssist assist = character.GetAssistant();

        if (assist == null)
        {
            return;
        }
        Vector3 dir;

        if (MousePlanePosition(out dir))
        {
            dir -= character.transform.position;
            assist.AddAssistForce(dir, true);
            nudgedLastFrame = true;
        }
    }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     body      = GetComponent <Rigidbody>();
     assistant = GetComponent <NudgeAssist>();
     visual    = GetComponent <TumbleArcVisual>();
 }