#Raycast2D not colliding properly with CollisionPolygon2D

4 messages · Page 1 of 1 (latest)

primal tapir
#

https://github.com/godotengine/godot/issues/72894 - same bug

A weird problem has occurred in the godot v3.5, where a Raycast2D doesnt completely collide with a CollisionPolygon2D (which is inside an area2D) and only does so on the edge of the polygon.

While testing the raycast with a normal CollisionShape2D everything works fine.

Also i have tried out this same test in godot v4 and once again everything works fine. So, i am quite stumped on why its not working in godot3

I would really appreciate any help

(see video to better visualize)

GitHub

Godot version 3.5.1.stable System information Ubuntu 22.04.1 LTS Issue description I'm trying to use RayCast2D to detect a CollisionShape2D CircleShape2D but the RayCast2D detects the Collision...

novel sonnet
#

You'll have to figure a way around the issue. You can use multiple collision shape nodes under an area or body node. With multiple shapes you can approximate the polygon. Or maybe even just change plans to use one shape node. - I was going to suggest switching physics engines but I guess that's just a Godot 4 thing as I can't find any for Godot 3.5 in the asset store. So, I guess the alternative would be to port the game to Godot 4. I've been using Godot 4.2.1 and it's been working pretty well.

crimson scaffold
#

First things even the raycast say it will detect area

#

But sorry due to unknown reasons it can only collide with physics bodies