How to get the normal of the collided object's surface?

Godot Version

v4.2.2.stable.mono.official [15073afe3]

Question

I’m trying to get the normal of the collided object at the point of collision. Thank you in advance for your help.

What kind of body are you using and what kind of collision?

I’m using CharacterBody2D’s MoveAndCollide() as the collision detector, all CollisionShape2D use rectangle but I want to expand it for custom shape too.

Try using GetNormal on the collision return value

1 Like

Thank you, I will try it and report back if it work or not.

It worked! Thank you for your help!

1 Like