Почему персонажа с CharacterController резко кидает наверх?
using System.Collections.Generic;
using UnityEngine;
public class ButtonJump : MonoBehaviour {
CharacterController cr_controller;
Vector3 jumpPos;
float JumpSpeed = 3f;
// Use this for initialization
void Start()
{
jumpPos = Vector3.zero;
cr_controller = GetComponent<CharacterController>();
jumpPos.y = jumpPos.y += 1f;
}
// Update is called once per frame
void OnMouseDown () {
if (cr_controller.isGrounded)
{
cr_controller.Move(jumpPos * JumpSpeed);
}