// 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; } }
// Use this for initialization void Start() { body = GetComponent <Rigidbody>(); assistant = GetComponent <NudgeAssist>(); visual = GetComponent <TumbleArcVisual>(); }