Help with follow NPC (SOLVED)

I took a looked at hihilogic’s Doggo example and after a while managed to get it somewhat into my game.
However when testing can’t figure out why the Follow Npc can’t jump?
Game:

Idk if just I am missing something important, help would be appreciated.

2 Likes

First of all: Thanks! I’m glad my example helped :slight_smile: (still super psyched about it getting on the examples page!)
Second of all:
*Stereotypical rock song plays *
*Gates of heaven open *
*hihilogic the all-helpful once descends from above *
*Cracks knuckles *
*Deep breath *
“Hello, Welcome to Good Burger, home of the Good Burger. What can I get for you today?”
JK.

Anyways…
Ah, yes. As I suspected. Someone pretty inexperienced with raycasts. Don’t beat yourself over the head about it, you’ll get it eventually :slight_smile:
See this? This is what we like to call a “problem”
image
Never, ever set your raycasts to Any Type. Always set it to the specific object to want it to be. In this case, you want ALL these raycast to be switched to whatever your ground block is. Select the dropdown and select your ground object.
image
Repeat this with all your raycasts.
Thank you for your business. Please come again.
Masked Studios

2 Likes

One problem: this won’t work because of your stairs.
The stairs restrict the player from moving, and once the NPC gets close it stops moving. It lands in spikes. Spikes don’t set off the switch enabling it to jump, rendering it useless.
In other words, scooch those stairs, as shown here:
image
Also, now the NPC jumps, but doesn’t make it all the way. If you screwed with the code, you might wanna undo that :upside_down_face:

2 Likes

Oof yea that’s some gravity
image

Try increasing the impulse in the NPC to jump, that might help get it all the way. Also, don’t disregard my statement about moving the stairs :upside_down_face:

2 Likes

That’s cause of this:

May have to fix that

2 Likes

Do you mean get rid of?
Or do you mean push them back?

2 Likes

aaah that’s why I will add as soon as possible (in school)

2 Likes

Ye and I just read to move the stairs, will do!

2 Likes

Yes.

1 Like