#Can't jump

1 messages · Page 1 of 1 (latest)

full nacelle
#

How do you make a rigidbody jump, I've tried like 50 different things and it hasn't worked.

fickle panther
#

Could you show an example of trying to get a rigidbody to jump and it not working?

#

i.e. show the scripts and nodetree and anything else relevant

#

We can't help much more than pointing you to the platformer tutorial without any more details

high venture
#

Or general control. RigidBodies are CharacterBodies but with much less control (like no Move and Slide)

full nacelle
#

What's that?

high venture
full nacelle
#

What does it do?

full nacelle
#

Issue is, I'm not sure how to detect when on ground

fickle panther
full nacelle
#

so there is no way for a rigidbody to detect ground?

fickle panther
#

You can but you'll need to code it yourself

full nacelle
#

simple or no?

fickle panther
#

Well there's a whole spectrum

#

you can do some pretty simple detection, but it will work weird in some edge cases

#

doing proper ground detection is more complicated

full nacelle
#

💀

fickle panther
#

Hm, rigidbody does handle its own collision though

#

Is there a particular reason you want rigidbody specifically?

full nacelle
#

I want it to collide with things

fickle panther
#

Characterbody collides too

full nacelle
#

oh sweet

fickle panther
#

I'd reccomend going to your rigidbody3d, right click, change type, and searching characterbody3d

full nacelle
#

I'll have to look up what a character body does

fickle panther
#

It's got a special move_and_slide() function you call that handles collision and everything for you

#

It allows you to specify an up vector and has a variable telling you if it's on the ground iirc

full nacelle
#

Alright I'll have to see if that works, cheers

fickle panther
#

you just call any of these functions if you're using a characterbody3d

#

super useful

#

Good luck!!

fickle panther
#

BTW if this question is solved, please mark it as such