v3.5.3.stable.official [6c814135b]
I’m using a KinematicBody2D for my player character.
When moving over slopes the following methods do not update, and return default values:
- get_floor_angle() = 0
- get_floor_normal() = (0, -1)
However, as soon as you stop on a slope, they update to return correct values.
This only happens when using RayShape2D as set up here using the info here Godot 3.1 will get many improvements to KinematicBody and here The addition of more separation shapes besides RayShape (and their relation to KinematicBody) · Issue #333 · godotengine/godot-proposals · GitHub
If I remove the RayShape2D then the both methods return correct values.
It seems like these methods are only updated if the main collision shape is touching the ground and not if the RayShape2D shape is used.
Here’s a video showing this issue: https://youtu.be/1wg8rsWW5jg
Note in the above video, you can see in the editor output that as soon as I stop my character on the slope, correct values are returned. But while moving over the slope they are not.
And here’s a video showing both methods returning correct values when not using RayShape2D: https://youtu.be/CLFTOnSODZs
Has anyone solved this issue before? I’m clearly missing something important here
Thanks in advance for any help given!