0 votes

How can I make a kinematic body that follows a path walk over a non-flat surface? Because whenever the character has to follow a path it seems to ignore every collision there is.

enter image description here

Section of the code as for now:

func physicsprocess(delta):
if pathnode < path.size():
var direction = (path[pathnode] - globaltransform.origin)
if direction.length() < 1:
pathnode += 1
andslide(Vector3((direction.normalized() * speed).x,0,(direction.normalized() * speed).z), Vector3.UP)
translation.y == rc.get

Godot version 3.2
in Engine by (29 points)

Update: Setting the y axis to 0 in the direction variable seems to make it work properly.

Please log in or register to answer this question.

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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.