0 votes

I want to know how to detect if a moving 2DArea will enter another 2DArea before they enter eachother, similar to how "testmove" works, I want to set a virtual position to check overlap before actually moving the instance. The built-in "areaentered"-like connections only work after the Areas have already entered each other.

I am new to Godot and I'm using this project to make a 2D Platformer, where my player extends a 2D Area. I am very adamant about using custom physics and collision detection, so it was frustrating when the only tutorials and help I could find were for Godot's built-in physics using the KinematicBody2D. The only helpful response to my question is an answer to my question, I politely ask that you don't respond with something like "try something else completely", I only want to know how to detect overlapping 2D objects using a virtual position to check collisions before the collision has occurred.

in Engine by (12 points)

1 Answer

0 votes

How about using a RayCast2D and casting it in the direction that the player is moving?

by (7,190 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 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 webmaster@godotengine.org with your username.