Hi,
Since the toad is more or less stationary while grounded on the high friction surface, I’m just checking if the velocity is 0 to allow the jump. Anything wrong with this approach anybody?
private void PullTrigger()
{
if (rb.velocity.magnitude == 0) {
Vector3 projectionVector = Vector3.ProjectOnPlane(head.Gaze.direction, Vector3.up);
Vector3 jumpVector = Vector3.RotateTowards(projectionVector, Vector3.up, Mathf.Deg2Rad * jumpAngleDegree, 0);
rb.velocity = jumpVector * jumpSpeed;
}
}