0 votes

Hi, I have made moving platforms for my platformer in which there is a kinematic body with two tweens attached to it,one for moving the platform and one bringing it back and it continues in a loop.

But what I have noticed is that it does not detect collision and stop while its changing its position.

Does anyone have a solution for this?

Godot version 3.4.4 stable
in Engine by (73 points)

If I understand correctly, your platform is a KinematicBody and you you want it to stop when it collides with something? What can the platform bump into that would make it stop? Platforms may support only one-way collisions, so do you want the platform to stop when something lands on it, or is it a block that supports collisions in all directions (like bumping into a wall)?

First of all, if you are using Tweens to move a kinematicbody using their position member, I think that is your issue as to why collisions aren't occurring. move_and_slide and move_and_collide are designed to move Kinematicbodies and have them stop when they bump into something.

1 Answer

0 votes

Use Areas to detect the collisions.

by (1,053 points)
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.