0 votes

Hello again seems like i must ask about everything i try to learn when it comes to this engine :D.
Well i now got a KinematicBody, meshinstance and a collisionshape (my player)

i got a wall (StaticBody with meshinstance and collisionshape) how make a script to notice that i collide with that wall?

I guess i must write on script that when hit the wall "stop walking" not sure, or is it possible without script?.

Moast important how to detect a collision?

asked Jan 10 in Engine by flonkopaten (29 points)

1 Answer

0 votes

For kinematic bodies to detect collision you have to move it with move or move_to, move automatically stop the body to prevent overlap and flag the body as colliding.

Look at kinematic character 3D demo for a simple implementation of a kinematic character controller.

And careful if you want to use multiple layers because I think KinematicBody don't have implemented the masks yet.

answered Jan 10 by eons (1,521 points)

Ok Thanks for answer

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.