Hey there gents! I had a really quick simple question about jumping via forces. I was prototyping a simple runner type game and ran into some issues adding jumping. Here is what I am working with
void Update () {
Vector3 myPos = transform.position;
myPos.z = zLock;
transform.position = myPos;
//if (Input.GetKeyUp(KeyCode.Space)) rigidbody.AddForce(Vector3.right * forceMulti);
rigidbody.AddForce(Vector3.right * forceMulti);
if (Input.GetKeyDown(KeyCode.Space)) {
rigidbody.AddForce(Vector3.up * jumpMulti);
Debug.Log("I'M JUMPING OMG!!");
}
}
I get the debug print for the jump but the Y position of the character is basically totally constant. Thanks for the help!