0 votes

I am far too deep using area as a scripted manager of its collisions. At some point I want this area with big rectangular shape to detect collision with another big rectangular shape of rigidbody, and I want to get this position where they clashed in first moment of collision. I can see RigidBody has some options like DirectBodySTate, and I could eventually shift responsibilities of detection to the rigidbody. However this would be a lot of pain and I find it hard to believe, that Area has no option of doing the same, since it has all the same signals anyway.
Anybody tried anything ?

Godot version godot 3.2 stable
in Engine by (2,410 points)

Use Raycast . Raycast collision point

raycast won't do. It is about collision of two shapes coming at different directions with different angles. Unless You have an idea how to implement raycast for this ? I am afraid it must be some kind of space query. For now i settled for custom AABB intersection, nut it is very inaccurate. Tried calling physics server for body direct state, but it crashes the engine, I guess thats what happens when direct state is called outside of process()

Add raycast to area. When there is a collision, let the raycast be activated and turn towards the body. then get the collision point. Just an idea . ( Google translate)

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 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.