C
C#2y ago
c_ccc

❔ I cant get jumping to work

Ik I am new to scripting but this one is just stupid. For the life of me, the jumping wont seem to work. void Update() { transform.rotation = Quaternion.Euler(0, angle, 0); float horizontalInput = Input.GetAxis("Horizontal"); angle -= horizontalInput * angleSpeed * Time.deltaTime; Vector3 newPosition = Quaternion.Euler(0, angle, 0) * new Vector3(0, 0, radius); transform.position = newPosition; if(Input.GetKeyDown(KeyCode.Space)|| Input.GetKeyDown(KeyCode.W)) { Debug.Log("Jumping!"); rb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse); } }
2 Replies
Trace
Trace2y ago
probably best for unity discord or #game-dev maybe
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server