Search Unity

Animation Curve Window Not Popping up.

Discussion in 'Animation' started by Phoxpsy, Oct 27, 2019.

  1. Phoxpsy

    Phoxpsy

    Joined:
    Apr 12, 2018
    Posts:
    1
    EDIT: NEVER MIND !!! i got it to work thank you See my Computer Screen is broken and the window was hidden behind the part of my computer screen i cannot see. BUT!!!

    im still up for other Jump Script Options so please feel free to let me kno!


    Good Morning, Evening, Night.
    i was following a Tutorial youtube on making a First-person Shooter Camara View. and iv almost completed the last Step That was Jump. and the Tutor, instructs me to add an Animation Curve to get an Up Down Jump motion. However.. i put in the AnimationCurve
    [SerializeField] private AnimationCurve jumpFallOff;
    [SerializeField] private float jumpMultiplier;
    [SerializeField] private KeyCode jumpKey;

    But then when i switch back over to unity and the Jump Fall Off Options Appeared with the AnimationCurve Grey out the editor.
    so i click on it just as he suggested and nothing popt up, i double click it i right click i click once i even tried Shift click Alt-click and Control Left click. nothing. i even when thru all the tabs up top. file, windows, view. all of it. i cant find a curve Editer anywhere. i did, however, find the curve editor in the animation editor. but i don't know how to work that thing lol. i was looking for the Preset Curves already made. ill post the video so you can see. and give you the time stamp.


    20:55. on the Youtube Channel. see how he clicks the Grey box and that window just pops up. i don't get that for some reason.

    anyways if there's any other way to implement a jump let me know. here are my full Scrips for the player movement

    ___________+++++++++++______________+++++++++++++______________+++++++++++++________

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    public class PlayerMove : MonoBehaviour
    {
    [SerializeField] private string horizontalInputName;
    [SerializeField] private string verticalInputName;
    [SerializeField] private float movmentSpeed;

    private CharacterController charController;

    [SerializeField] private AnimationCurve jumpFallOff;
    [SerializeField] private float jumpMultiplier;
    [SerializeField] private KeyCode jumpKey;


    private bool isJumping;

    private void Awake()
    {
    charController = GetComponent<CharacterController>();
    }

    private void Update()
    {
    PlayerMovment();
    }

    private void PlayerMovment()
    {
    float horizInput = Input.GetAxis(horizontalInputName) * movmentSpeed;
    float vertInput = Input.GetAxis(verticalInputName) * movmentSpeed;

    Vector3 forwardMovment = transform.forward * vertInput;
    Vector3 rightMovment = transform.right * horizInput;

    charController.SimpleMove(forwardMovment + rightMovment);

    JumpInput();

    }

    private void JumpInput()
    {
    if(Input.GetKeyDown(jumpKey) && !isJumping)
    {
    isJumping = true;
    StartCoroutine(JumpEvent());
    }
    }

    private IEnumerator JumpEvent()
    {
    float timeInAir = 0.0f;

    do
    {
    float jumpForce = jumpFallOff.Evaluate(timeInAir);
    charController.Move(Vector3.up * jumpForce * jumpMultiplier * Time.deltaTime);
    timeInAir += Time.deltaTime;
    yield return null;
    } while (!charController.isGrounded && charController.collisionFlags != CollisionFlags.Above);

    isJumping = false;
    }

    }
     

    Attached Files:

    Last edited: Oct 27, 2019