#how to add jumping into my script
11 messages · Page 1 of 1 (latest)
if Input.is_action_just_pressed("jump"):
apply_central_force(Vector3.UP * jump_strength)
this should work, make sure to declare the jump_strength variable.
PS: please post your code in text instead of an image
How do I post it in code not text also would I declare the jump variable using var jump = or making it in the keys
Would I use var jump = Vector3
Or somthing of the sort
@dusk ether
You should probably use a CharacterBody3D instead of a RigidBody3D for a player
there's an option when creating a script for one to use the character controller template
i think
surround your code in 3 ` characters (the key next to 1 on your keyboard) like so
```
code here
```
var jump_strength := 100