#how to add jumping into my script

11 messages · Page 1 of 1 (latest)

floral path
#

i have got no idea and it is hurting

dusk ether
#
    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

floral path
#

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

lost violet
#

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

fair temple
dusk ether