0 votes

Hello. I am making a 3d game in which you have a side kick that follows you constantly unless told to or is close enough to the player. I have this so far from another Godoter:

func physicsprocess(delta):
var toplayer = translation.directionto(player.translation)
moveandslide(to_player * speed)
velocity.y += delta * gravity

But there's no gravity, and the sidekick isn't facing the player, and I can't figure that one out either. Is there anyway any of ya'll can help me please? Thanks

asked Jan 16 in Engine by Wodsobe Dobe (20 points)

1 Answer

+1 vote

You should check out "Intro to Steering Behaviors in Godot part 1: Follow AI" (2019-10-13) tutorial series:

When you are done watching/coding just download project end source code from github:

Copy and replace code to your project and you should have what you want! :)

Good Luck,

answered Jan 16 by oofman (72 points)
edited Jan 16 by oofman

Thanks oofman! I'll definitely check it out!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.