Godot Version
4.2.1 stable
Question
Im having some collision issues when my characterbody2D node interacts with a ramp that is in motion. Im not sure whats causing it as I believe the bug has been there for a while, I just didnt notice it before.
In the diagram above I drew the bug as I understand up to now. The grey rectangle is a moving platform and it goes up and down.
There is a player on top of the diagram.
If he falls down on the platform from there, he will be instantly moved to point βCβ. If you hit the bottom of the platform you will be instantly moved the point opposite to βCβ.
Now for the player on the right.
If he hits the platform from trajectory βAβ, he will be instantly moved to point βCβ.
If he hits the platform from trajectory βBβ, he will just bounce off.
The only difference from trajectory βAβ and βBβ is that you have to hit it from above or below the midpoint of the side face.
If you approach the left face of the platform then the results are the same as hitting it from the right side except reversed, so hitting the bottom half of the left side will rapidly move the player towards the bottom point of the rectangle, and hitting the top half on the left side will allow you to bounce off.
Making the character slide angle higher allows the player to walk on the portion of the platform where you would normally bounce off but thats it, the quick movement of the player still persists.
I also tried walking the characterbody along the top of another moving ramp which is almost straight but has a slight angle, the character barely moves and when he does its very jittery, instaneous movements.
I donβt know how else to explain it so Iβll record a video soon for clarity. I would appreciate any advice, thank you.